diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 1f74495b3e60..6beb3a8a7de4 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -129,6 +129,7 @@ specifiers: '@rush-temp/arm-machinelearningcompute': file:./projects/arm-machinelearningcompute.tgz '@rush-temp/arm-machinelearningexperimentation': file:./projects/arm-machinelearningexperimentation.tgz '@rush-temp/arm-managedapplications': file:./projects/arm-managedapplications.tgz + '@rush-temp/arm-managednetworkfabric': file:./projects/arm-managednetworkfabric.tgz '@rush-temp/arm-managementgroups': file:./projects/arm-managementgroups.tgz '@rush-temp/arm-managementpartner': file:./projects/arm-managementpartner.tgz '@rush-temp/arm-maps': file:./projects/arm-maps.tgz @@ -477,6 +478,7 @@ dependencies: '@rush-temp/arm-machinelearningcompute': file:projects/arm-machinelearningcompute.tgz '@rush-temp/arm-machinelearningexperimentation': file:projects/arm-machinelearningexperimentation.tgz '@rush-temp/arm-managedapplications': file:projects/arm-managedapplications.tgz + '@rush-temp/arm-managednetworkfabric': file:projects/arm-managednetworkfabric.tgz '@rush-temp/arm-managementgroups': file:projects/arm-managementgroups.tgz '@rush-temp/arm-managementpartner': file:projects/arm-managementpartner.tgz '@rush-temp/arm-maps': file:projects/arm-maps.tgz @@ -2651,7 +2653,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/chai-as-promised/7.1.5: @@ -2673,7 +2675,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/cookie/0.4.1: @@ -2683,7 +2685,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/debug/4.1.8: @@ -2695,7 +2697,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/eslint/8.4.10: @@ -2716,7 +2718,7 @@ packages: /@types/express-serve-static-core/4.17.35: resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -2734,13 +2736,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/http-errors/2.0.1: @@ -2757,7 +2759,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/json-schema/7.0.12: @@ -2771,13 +2773,13 @@ packages: /@types/jsonwebtoken/9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/linkify-it/3.0.2: @@ -2836,20 +2838,20 @@ packages: /@types/mysql/2.15.19: resolution: {integrity: sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 form-data: 3.0.1 dev: false /@types/node-fetch/2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 form-data: 3.0.1 dev: false @@ -2882,7 +2884,7 @@ packages: /@types/pg/8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -2910,7 +2912,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/semaphore/1.1.1: @@ -2929,7 +2931,7 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/serve-static/1.15.2: @@ -2937,7 +2939,7 @@ packages: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/shimmer/1.0.2: @@ -2963,13 +2965,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/tough-cookie/4.0.2: @@ -2983,7 +2985,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/underscore/1.11.5: @@ -3001,19 +3003,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/ws/8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false /@types/yargs-parser/21.0.0: @@ -3030,7 +3032,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.51 + '@types/node': 16.18.36 dev: false optional: true @@ -4272,7 +4274,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -4450,7 +4452,7 @@ packages: cosmiconfig: 7.1.0 debug: 4.3.4 deps-regex: 0.1.4 - ignore: 5.1.9 + ignore: 5.2.4 is-core-module: 2.12.1 js-yaml: 3.14.1 json5: 2.2.3 @@ -4482,7 +4484,7 @@ packages: '@pnpm/crypto.base32-hash': 1.0.1 '@pnpm/types': 8.9.0 encode-registry: 3.0.0 - semver: 7.3.8 + semver: 7.5.3 dev: false /deps-regex/0.1.4: @@ -4653,7 +4655,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.51 + '@types/node': 16.18.36 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -5636,7 +5638,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -6045,7 +6047,7 @@ packages: cli-cursor: 3.1.0 cli-width: 3.0.0 external-editor: 3.1.0 - figures: 3.0.0 + figures: 3.2.0 lodash: 4.17.21 mute-stream: 0.0.8 run-async: 2.4.1 @@ -7800,7 +7802,7 @@ packages: pkg-dir: 5.0.0 preferred-pm: 3.0.3 rc-config-loader: 4.1.3 - semver: 7.3.8 + semver: 7.5.3 semver-diff: 3.1.1 strip-ansi: 6.0.1 text-table: 0.2.0 @@ -8507,7 +8509,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.51 + '@types/node': 16.18.36 long: 5.2.3 dev: false @@ -14453,6 +14455,34 @@ packages: - supports-color dev: false + file:projects/arm-managednetworkfabric.tgz: + resolution: {integrity: sha512-BgCsPYcWq6HXwmCa/JuGi00Xdjbz5FjmcAeUgn8ZniG5XTKxC2owZCiqKIGtNj3JIrVrxinTm4z1oUtte2hRwA==, tarball: file:projects/arm-managednetworkfabric.tgz} + name: '@rush-temp/arm-managednetworkfabric' + version: 0.0.0 + dependencies: + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.36.0_@types+node@14.18.51 + '@rollup/plugin-commonjs': 24.1.0_rollup@2.79.1 + '@rollup/plugin-json': 6.0.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.5 + '@types/node': 14.18.51 + chai: 4.3.7 + cross-env: 7.0.3 + dotenv: 16.3.1 + mkdirp: 2.1.6 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 2.79.1 + rollup-plugin-sourcemaps: 0.6.3_ljfryqei6aq3wnzlbhhwgmxvcu + tslib: 2.5.3 + typescript: 5.0.4 + uglify-js: 3.17.4 + transitivePeerDependencies: + - supports-color + dev: false + file:projects/arm-managementgroups.tgz: resolution: {integrity: sha512-ziQJ20/rsbG0/jBi+jIoa6Oj2M4Pa1uprt43/dy9jZd9cKGyaj90MC/XCiDErWwRzV+NbGQmkPJgcZCxjnA/IQ==, tarball: file:projects/arm-managementgroups.tgz} name: '@rush-temp/arm-managementgroups' @@ -20694,7 +20724,7 @@ packages: dev: false file:projects/quantum-jobs.tgz: - resolution: {integrity: sha512-iL8pTWfI8dYU2LRk7aDffxGsznyM5+v6A78/zZjnRKossg8daDCHDl8tLpo02zAmQobXOmz07q/JU/xkJ7bp7w==, tarball: file:projects/quantum-jobs.tgz} + resolution: {integrity: sha512-I0yPunNXavYKQ6fcFOjXD2NaH/lyCeE66QctIKx3QGR5PO72ubvIYEJHjUzOnKAaT7xyjAL39/Regs0w5lz45g==, tarball: file:projects/quantum-jobs.tgz} name: '@rush-temp/quantum-jobs' version: 0.0.0 dependencies: @@ -20734,7 +20764,6 @@ packages: transitivePeerDependencies: - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false diff --git a/eng/ignore-links.txt b/eng/ignore-links.txt index 4c4b975a3f76..379cfe2c5f84 100644 --- a/eng/ignore-links.txt +++ b/eng/ignore-links.txt @@ -22,3 +22,4 @@ https://docs.microsoft.com/javascript/api/@azure/arm-qumulo?view=azure-node-prev https://docs.microsoft.com/javascript/api/@azure/arm-containerservicefleet?view=azure-node-preview https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdbforpostgresql?view=azure-node-preview https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdbforpostgresql +https://docs.microsoft.com/javascript/api/@azure/arm-managednetworkfabric?view=azure-node-preview diff --git a/rush.json b/rush.json index 084c2be05433..f1063ed38104 100644 --- a/rush.json +++ b/rush.json @@ -1,7 +1,7 @@ /** * This is the main configuration file for Rush. * For full documentation, please see https://rushjs.io - */ { + */{ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", /** * (Required) This specifies the version of the Rush engine to be used in this repo. @@ -2022,6 +2022,11 @@ "packageName": "@azure/arm-cosmosdbforpostgresql", "projectFolder": "sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-managednetworkfabric", + "projectFolder": "sdk/managednetworkfabric/arm-managednetworkfabric", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/arm-managednetworkfabric/CHANGELOG.md new file mode 100644 index 000000000000..c9383120263d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-06-26) + +The package of @azure/arm-managednetworkfabric is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/LICENSE b/sdk/managednetworkfabric/arm-managednetworkfabric/LICENSE new file mode 100644 index 000000000000..3a1d9b6f24f7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/README.md b/sdk/managednetworkfabric/arm-managednetworkfabric/README.md new file mode 100644 index 000000000000..b43f71f8e732 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/README.md @@ -0,0 +1,109 @@ +# Azure Network Fabric Management client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Network Fabric Management client. + +Self service experience for Azure Network Fabric API. + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managednetworkfabric/arm-managednetworkfabric) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-managednetworkfabric) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-managednetworkfabric?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- 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]. + +### Install the `@azure/arm-managednetworkfabric` package + +Install the Azure Network Fabric Management client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-managednetworkfabric +``` + +### Create and authenticate a `AzureNetworkFabricManagementServiceAPI` + +To create a client object to access the Azure Network Fabric Management API, you will need the `endpoint` of your Azure Network Fabric Management resource and a `credential`. The Azure Network Fabric Management client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Network Fabric Management resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure Network Fabric Management** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +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 AzureNetworkFabricManagementServiceAPI(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); +``` + + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### AzureNetworkFabricManagementServiceAPI + +`AzureNetworkFabricManagementServiceAPI` is the primary interface for developers using the Azure Network Fabric Management client library. Explore the methods on this client object to understand the different features of the Azure Network Fabric Management service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmanagednetworkfabric%2Farm-managednetworkfabric%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/_meta.json b/sdk/managednetworkfabric/arm-managednetworkfabric/_meta.json new file mode 100644 index 000000000000..b439928d845b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "89e91a02e7cf20da48bb84c34eda694faed4dc5c", + "readme": "specification/managednetworkfabric/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\managednetworkfabric\\resource-manager\\readme.md --use=@autorest/typescript@6.0.5 --generate-sample=true", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.5" +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/api-extractor.json b/sdk/managednetworkfabric/arm-managednetworkfabric/api-extractor.json new file mode 100644 index 000000000000..13222edd6ada --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/api-extractor.json @@ -0,0 +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" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-managednetworkfabric.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/assets.json b/sdk/managednetworkfabric/arm-managednetworkfabric/assets.json new file mode 100644 index 000000000000..e4dc92e5c5fa --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "js", + "TagPrefix": "js/managednetworkfabric/arm-managednetworkfabric", + "Tag": "js/managednetworkfabric/arm-managednetworkfabric_ca3ccdb61f" +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/package.json b/sdk/managednetworkfabric/arm-managednetworkfabric/package.json new file mode 100644 index 000000000000..51a3242a5a4e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/package.json @@ -0,0 +1,123 @@ +{ + "name": "@azure/arm-managednetworkfabric", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for AzureNetworkFabricManagementServiceAPI.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=14.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.5.3", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.8.0", + "tslib": "^2.2.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-managednetworkfabric.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.31.1", + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^2.1.2", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~5.0.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "dotenv": "^16.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.0.0", + "mocha": "^7.1.1", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^14.0.0", + "@azure/dev-tool": "^1.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/azureNetworkFabricManagementServiceAPI.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managednetworkfabric/arm-managednetworkfabric", + "//sampleConfiguration": { + "productName": "", + "productSlugs": [ + "azure" + ], + "disableDocsMs": true, + "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-managednetworkfabric?view=azure-node-preview" + } +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/review/arm-managednetworkfabric.api.md b/sdk/managednetworkfabric/arm-managednetworkfabric/review/arm-managednetworkfabric.api.md new file mode 100644 index 000000000000..497ec303f38a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/review/arm-managednetworkfabric.api.md @@ -0,0 +1,3262 @@ +## API Report File for "@azure/arm-managednetworkfabric" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export interface AccessControlList extends TrackedResource { + addressFamily: AddressFamily; + annotation?: string; + conditions: AccessControlListConditionProperties[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface AccessControlListConditionProperties extends AnnotationResource { + action: ConditionActionType; + destinationAddress: string; + destinationPort: string; + protocol: number; + sequenceNumber: number; + sourceAddress: string; + sourcePort: string; +} + +// @public +export interface AccessControlListPatch { + addressFamily?: AddressFamily; + annotation?: string; + conditions?: AccessControlListConditionProperties[]; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface AccessControlListPatchProperties extends AnnotationResource { + addressFamily?: AddressFamily; + conditions?: AccessControlListConditionProperties[]; +} + +// @public +export interface AccessControlListProperties extends AnnotationResource { + addressFamily: AddressFamily; + conditions: AccessControlListConditionProperties[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface AccessControlLists { + create(resourceGroupName: string, accessControlListName: string, body: AccessControlList, options?: AccessControlListsCreateOptionalParams): Promise; + delete(resourceGroupName: string, accessControlListName: string, options?: AccessControlListsDeleteOptionalParams): Promise; + get(resourceGroupName: string, accessControlListName: string, options?: AccessControlListsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: AccessControlListsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AccessControlListsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, accessControlListName: string, body: AccessControlListPatch, options?: AccessControlListsUpdateOptionalParams): Promise; +} + +// @public +export interface AccessControlListsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessControlListsCreateResponse = AccessControlList; + +// @public +export interface AccessControlListsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface AccessControlListsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessControlListsGetResponse = AccessControlList; + +// @public +export interface AccessControlListsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessControlListsListByResourceGroupNextResponse = AccessControlListsListResult; + +// @public +export interface AccessControlListsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessControlListsListByResourceGroupResponse = AccessControlListsListResult; + +// @public +export interface AccessControlListsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessControlListsListBySubscriptionNextResponse = AccessControlListsListResult; + +// @public +export interface AccessControlListsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessControlListsListBySubscriptionResponse = AccessControlListsListResult; + +// @public +export interface AccessControlListsListResult { + nextLink?: string; + value?: AccessControlList[]; +} + +// @public +export interface AccessControlListsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AccessControlListsUpdateResponse = AccessControlList; + +// @public +export interface ActionIpCommunityProperties extends IpCommunityAddOperationProperties, IpCommunityDeleteOperationProperties, IpCommunitySetOperationProperties { +} + +// @public +export interface ActionIpExtendedCommunityProperties extends IpExtendedCommunityAddOperationProperties, IpExtendedCommunityDeleteOperationProperties, IpExtendedCommunitySetOperationProperties { +} + +// @public +export type ActionType = string; + +// @public +export type AddressFamily = string; + +// @public +export type AdministrativeState = string; + +// @public +export interface AggregateRoute { + prefix?: string; +} + +// @public +export interface AggregateRouteConfiguration { + ipv4Routes?: AggregateRoute[]; + ipv6Routes?: AggregateRoute[]; +} + +// @public +export type AllowASOverride = string; + +// @public +export interface AnnotationResource { + annotation?: string; +} + +// @public +export interface ARPProperties { + address: string; + age: string; + interface: string; + macAddress: string; + state?: string; +} + +// @public (undocumented) +export class AzureNetworkFabricManagementServiceAPI extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureNetworkFabricManagementServiceAPIOptionalParams); + // (undocumented) + accessControlLists: AccessControlLists; + // (undocumented) + apiVersion: string; + // (undocumented) + externalNetworks: ExternalNetworks; + // (undocumented) + internalNetworks: InternalNetworks; + // (undocumented) + ipCommunities: IpCommunities; + // (undocumented) + ipExtendedCommunities: IpExtendedCommunities; + // (undocumented) + ipPrefixes: IpPrefixes; + // (undocumented) + l2IsolationDomains: L2IsolationDomains; + // (undocumented) + l3IsolationDomains: L3IsolationDomains; + // (undocumented) + networkDevices: NetworkDevices; + // (undocumented) + networkDeviceSkus: NetworkDeviceSkus; + // (undocumented) + networkFabricControllers: NetworkFabricControllers; + // (undocumented) + networkFabrics: NetworkFabrics; + // (undocumented) + networkFabricSkus: NetworkFabricSkus; + // (undocumented) + networkInterfaces: NetworkInterfaces; + // (undocumented) + networkRacks: NetworkRacks; + // (undocumented) + networkRackSkus: NetworkRackSkus; + // (undocumented) + networkToNetworkInterconnects: NetworkToNetworkInterconnects; + // (undocumented) + operations: Operations; + // (undocumented) + routePolicies: RoutePolicies; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface AzureNetworkFabricManagementServiceAPIOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface BfdConfiguration { + readonly administrativeState?: EnabledDisabledState; + readonly interval?: number; + readonly multiplier?: number; +} + +// @public +export interface BgpConfiguration extends AnnotationResource { + allowAS?: number; + allowASOverride?: AllowASOverride; + bfdConfiguration?: BfdConfiguration; + defaultRouteOriginate?: BooleanEnumProperty; + readonly fabricASN?: number; + ipv4ListenRangePrefixes?: string[]; + ipv4NeighborAddress?: NeighborAddress[]; + ipv6ListenRangePrefixes?: string[]; + ipv6NeighborAddress?: NeighborAddress[]; + peerASN: number; +} + +// @public +export type BooleanEnumProperty = string; + +// @public +export type CommunityActionTypes = string; + +// @public +export type Condition = string; + +// @public +export type ConditionActionType = string; + +// @public +export interface ConnectedSubnet extends AnnotationResource { + prefix?: string; +} + +// @public +export type CreatedByType = string; + +// @public +export interface DeviceInterfaceProperties { + identifier?: string; + interfaceType?: string; + supportedConnectorTypes?: SupportedConnectorProperties[]; +} + +// @public +export interface DeviceLimits { + maxBidirectionalForwardingDetectionPeers?: number; + maxBorderGatewayProtocolPeers?: number; + maxSubInterfaces?: number; + maxTunnelInterfaces?: number; + maxVirtualRouterFunctions?: number; + physicalInterfaceCount?: number; +} + +// @public +export type EnabledDisabledState = string; + +// @public +export interface EnableDisableOnResources { + resourceIds?: string[]; +} + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface ExpressRouteConnectionInformation { + expressRouteAuthorizationKey: string; + expressRouteCircuitId: string; +} + +// @public +export type ExpressRouteConnectionState = string; + +// @public +export interface ExpressRouteStatusDef { + expressRouteCircuitId?: string; + expressRouteStatus?: ExpressRouteConnectionState; +} + +// @public +export interface ExtendedLocation { + name?: string; + type?: string; +} + +// @public +export interface ExternalNetwork extends ProxyResource { + readonly administrativeState?: EnabledDisabledState; + annotation?: string; + readonly disabledOnResources?: string[]; + exportRoutePolicyId?: string; + importRoutePolicyId?: string; + readonly networkToNetworkInterconnectId?: string; + optionAProperties?: ExternalNetworkPropertiesOptionAProperties; + optionBProperties?: OptionBProperties; + peeringOption: PeeringOption; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface ExternalNetworkPatch { + annotation?: string; + exportRoutePolicyId?: string; + importRoutePolicyId?: string; + optionAProperties?: Layer3OptionAProperties; + optionBProperties?: OptionBProperties; + peeringOption?: PeeringOption; +} + +// @public +export interface ExternalNetworkPatchableProperties { + exportRoutePolicyId?: string; + importRoutePolicyId?: string; + optionAProperties?: Layer3OptionAProperties; + optionBProperties?: OptionBProperties; + peeringOption?: PeeringOption; +} + +// @public +export interface ExternalNetworkPatchProperties extends AnnotationResource, ExternalNetworkPatchableProperties { +} + +// @public +export interface ExternalNetworkProperties extends AnnotationResource { + readonly administrativeState?: EnabledDisabledState; + readonly disabledOnResources?: string[]; + exportRoutePolicyId?: string; + importRoutePolicyId?: string; + readonly networkToNetworkInterconnectId?: string; + optionAProperties?: ExternalNetworkPropertiesOptionAProperties; + optionBProperties?: OptionBProperties; + peeringOption: PeeringOption; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface ExternalNetworkPropertiesOptionAProperties extends Layer3OptionAProperties { +} + +// @public +export interface ExternalNetworks { + beginClearArpEntries(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: EnableDisableOnResources, options?: ExternalNetworksClearArpEntriesOptionalParams): Promise, ExternalNetworksClearArpEntriesResponse>>; + beginClearArpEntriesAndWait(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: EnableDisableOnResources, options?: ExternalNetworksClearArpEntriesOptionalParams): Promise; + beginClearIpv6Neighbors(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: EnableDisableOnResources, options?: ExternalNetworksClearIpv6NeighborsOptionalParams): Promise, ExternalNetworksClearIpv6NeighborsResponse>>; + beginClearIpv6NeighborsAndWait(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: EnableDisableOnResources, options?: ExternalNetworksClearIpv6NeighborsOptionalParams): Promise; + beginCreate(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: ExternalNetwork, options?: ExternalNetworksCreateOptionalParams): Promise, ExternalNetworksCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: ExternalNetwork, options?: ExternalNetworksCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, options?: ExternalNetworksDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, options?: ExternalNetworksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: ExternalNetworkPatch, options?: ExternalNetworksUpdateOptionalParams): Promise, ExternalNetworksUpdateResponse>>; + beginUpdateAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: UpdateAdministrativeState, options?: ExternalNetworksUpdateAdministrativeStateOptionalParams): Promise, ExternalNetworksUpdateAdministrativeStateResponse>>; + beginUpdateAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: UpdateAdministrativeState, options?: ExternalNetworksUpdateAdministrativeStateOptionalParams): Promise; + beginUpdateAndWait(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: ExternalNetworkPatch, options?: ExternalNetworksUpdateOptionalParams): Promise; + beginUpdateBfdForBgpAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: UpdateAdministrativeState, options?: ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams): Promise, ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse>>; + beginUpdateBfdForBgpAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: UpdateAdministrativeState, options?: ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams): Promise; + beginUpdateBgpAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: UpdateAdministrativeState, options?: ExternalNetworksUpdateBgpAdministrativeStateOptionalParams): Promise, ExternalNetworksUpdateBgpAdministrativeStateResponse>>; + beginUpdateBgpAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, body: UpdateAdministrativeState, options?: ExternalNetworksUpdateBgpAdministrativeStateOptionalParams): Promise; + get(resourceGroupName: string, l3IsolationDomainName: string, externalNetworkName: string, options?: ExternalNetworksGetOptionalParams): Promise; + list(resourceGroupName: string, l3IsolationDomainName: string, options?: ExternalNetworksListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ExternalNetworksClearArpEntriesHeaders { + location?: string; +} + +// @public +export interface ExternalNetworksClearArpEntriesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExternalNetworksClearArpEntriesResponse = ExternalNetworksClearArpEntriesHeaders; + +// @public +export interface ExternalNetworksClearIpv6NeighborsHeaders { + location?: string; +} + +// @public +export interface ExternalNetworksClearIpv6NeighborsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExternalNetworksClearIpv6NeighborsResponse = ExternalNetworksClearIpv6NeighborsHeaders; + +// @public +export interface ExternalNetworksCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExternalNetworksCreateResponse = ExternalNetwork; + +// @public +export interface ExternalNetworksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ExternalNetworksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExternalNetworksGetResponse = ExternalNetwork; + +// @public +export interface ExternalNetworksList { + nextLink?: string; + value?: ExternalNetwork[]; +} + +// @public +export interface ExternalNetworksListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExternalNetworksListNextResponse = ExternalNetworksList; + +// @public +export interface ExternalNetworksListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExternalNetworksListResponse = ExternalNetworksList; + +// @public +export interface ExternalNetworksUpdateAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface ExternalNetworksUpdateAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExternalNetworksUpdateAdministrativeStateResponse = ExternalNetworksUpdateAdministrativeStateHeaders; + +// @public +export interface ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse = ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders; + +// @public +export interface ExternalNetworksUpdateBgpAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface ExternalNetworksUpdateBgpAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExternalNetworksUpdateBgpAdministrativeStateResponse = ExternalNetworksUpdateBgpAdministrativeStateHeaders; + +// @public +export interface ExternalNetworksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExternalNetworksUpdateResponse = ExternalNetwork; + +// @public +export interface FabricBfdConfiguration { + readonly interval?: number; + readonly multiplier?: number; +} + +// @public +export type FailedSucceededState = string; + +// @public +export function getContinuationToken(page: unknown): string | undefined; + +// @public +export interface GetDeviceStatusProperties { + operationalStatus: OperationalStatus; + powerCycleState: PowerCycleState; + serialNumber: string; +} + +// @public +export interface GetDynamicInterfaceMapsPropertiesItem extends InterfaceStatus { + name?: string; +} + +// @public +export interface GetStaticInterfaceMapsPropertiesItem { + channelGroupId?: number; + connectedTo?: string; + connectorType?: string; + description?: string; + identifier?: string; + interfaceType?: string; + name?: string; + speed?: number; +} + +// @public +export interface InfrastructureServices { + ipv4AddressSpaces?: string[]; + ipv6AddressSpaces?: string[]; +} + +// @public +export interface InterfaceStatus { + readonly administrativeState?: EnabledDisabledState; + connectedTo?: string; + operationalStatus?: string; + phyStatus?: string; + transceiverStatus?: string; +} + +// @public +export type InterfaceType = string; + +// @public +export interface InternalNetwork extends ProxyResource { + readonly administrativeState?: EnabledDisabledState; + annotation?: string; + readonly bfdDisabledOnResources?: string[]; + readonly bfdForStaticRoutesDisabledOnResources?: string[]; + bgpConfiguration?: BgpConfiguration; + readonly bgpDisabledOnResources?: string[]; + connectedIPv4Subnets?: ConnectedSubnet[]; + connectedIPv6Subnets?: ConnectedSubnet[]; + readonly disabledOnResources?: string[]; + exportRoutePolicyId?: string; + importRoutePolicyId?: string; + mtu?: number; + readonly provisioningState?: ProvisioningState; + staticRouteConfiguration?: StaticRouteConfiguration; + vlanId: number; +} + +// @public +export interface InternalNetworkPatch { + annotation?: string; + bgpConfiguration?: BgpConfiguration; + connectedIPv4Subnets?: ConnectedSubnet[]; + connectedIPv6Subnets?: ConnectedSubnet[]; + exportRoutePolicyId?: string; + importRoutePolicyId?: string; + mtu?: number; + staticRouteConfiguration?: StaticRouteConfiguration; +} + +// @public +export interface InternalNetworkPatchableProperties { + bgpConfiguration?: BgpConfiguration; + connectedIPv4Subnets?: ConnectedSubnet[]; + connectedIPv6Subnets?: ConnectedSubnet[]; + exportRoutePolicyId?: string; + importRoutePolicyId?: string; + mtu?: number; + staticRouteConfiguration?: StaticRouteConfiguration; +} + +// @public +export interface InternalNetworkPatchProperties extends AnnotationResource, InternalNetworkPatchableProperties { +} + +// @public +export interface InternalNetworkProperties extends AnnotationResource, InternalNetworkPatchableProperties { + readonly administrativeState?: EnabledDisabledState; + readonly bfdDisabledOnResources?: string[]; + readonly bfdForStaticRoutesDisabledOnResources?: string[]; + readonly bgpDisabledOnResources?: string[]; + readonly disabledOnResources?: string[]; + readonly provisioningState?: ProvisioningState; + vlanId: number; +} + +// @public +export interface InternalNetworks { + beginClearArpEntries(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: EnableDisableOnResources, options?: InternalNetworksClearArpEntriesOptionalParams): Promise, InternalNetworksClearArpEntriesResponse>>; + beginClearArpEntriesAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: EnableDisableOnResources, options?: InternalNetworksClearArpEntriesOptionalParams): Promise; + beginClearIpv6Neighbors(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: EnableDisableOnResources, options?: InternalNetworksClearIpv6NeighborsOptionalParams): Promise, InternalNetworksClearIpv6NeighborsResponse>>; + beginClearIpv6NeighborsAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: EnableDisableOnResources, options?: InternalNetworksClearIpv6NeighborsOptionalParams): Promise; + beginCreate(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: InternalNetwork, options?: InternalNetworksCreateOptionalParams): Promise, InternalNetworksCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: InternalNetwork, options?: InternalNetworksCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, options?: InternalNetworksDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, options?: InternalNetworksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: InternalNetworkPatch, options?: InternalNetworksUpdateOptionalParams): Promise, InternalNetworksUpdateResponse>>; + beginUpdateAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: UpdateAdministrativeState, options?: InternalNetworksUpdateAdministrativeStateOptionalParams): Promise, InternalNetworksUpdateAdministrativeStateResponse>>; + beginUpdateAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: UpdateAdministrativeState, options?: InternalNetworksUpdateAdministrativeStateOptionalParams): Promise; + beginUpdateAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: InternalNetworkPatch, options?: InternalNetworksUpdateOptionalParams): Promise; + beginUpdateBfdForBgpAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: UpdateAdministrativeState, options?: InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams): Promise, InternalNetworksUpdateBfdForBgpAdministrativeStateResponse>>; + beginUpdateBfdForBgpAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: UpdateAdministrativeState, options?: InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams): Promise; + beginUpdateBfdForStaticRouteAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: UpdateAdministrativeState, options?: InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams): Promise, InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse>>; + beginUpdateBfdForStaticRouteAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: UpdateAdministrativeState, options?: InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams): Promise; + beginUpdateBgpAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: UpdateAdministrativeState, options?: InternalNetworksUpdateBgpAdministrativeStateOptionalParams): Promise, InternalNetworksUpdateBgpAdministrativeStateResponse>>; + beginUpdateBgpAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, body: UpdateAdministrativeState, options?: InternalNetworksUpdateBgpAdministrativeStateOptionalParams): Promise; + get(resourceGroupName: string, l3IsolationDomainName: string, internalNetworkName: string, options?: InternalNetworksGetOptionalParams): Promise; + list(resourceGroupName: string, l3IsolationDomainName: string, options?: InternalNetworksListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface InternalNetworksClearArpEntriesHeaders { + location?: string; +} + +// @public +export interface InternalNetworksClearArpEntriesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type InternalNetworksClearArpEntriesResponse = InternalNetworksClearArpEntriesHeaders; + +// @public +export interface InternalNetworksClearIpv6NeighborsHeaders { + location?: string; +} + +// @public +export interface InternalNetworksClearIpv6NeighborsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type InternalNetworksClearIpv6NeighborsResponse = InternalNetworksClearIpv6NeighborsHeaders; + +// @public +export interface InternalNetworksCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type InternalNetworksCreateResponse = InternalNetwork; + +// @public +export interface InternalNetworksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface InternalNetworksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type InternalNetworksGetResponse = InternalNetwork; + +// @public +export interface InternalNetworksList { + nextLink?: string; + value?: InternalNetwork[]; +} + +// @public +export interface InternalNetworksListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type InternalNetworksListNextResponse = InternalNetworksList; + +// @public +export interface InternalNetworksListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type InternalNetworksListResponse = InternalNetworksList; + +// @public +export interface InternalNetworksUpdateAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface InternalNetworksUpdateAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type InternalNetworksUpdateAdministrativeStateResponse = InternalNetworksUpdateAdministrativeStateHeaders; + +// @public +export interface InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type InternalNetworksUpdateBfdForBgpAdministrativeStateResponse = InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders; + +// @public +export interface InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse = InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders; + +// @public +export interface InternalNetworksUpdateBgpAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface InternalNetworksUpdateBgpAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type InternalNetworksUpdateBgpAdministrativeStateResponse = InternalNetworksUpdateBgpAdministrativeStateHeaders; + +// @public +export interface InternalNetworksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type InternalNetworksUpdateResponse = InternalNetwork; + +// @public +export interface IpCommunities { + beginCreate(resourceGroupName: string, ipCommunityName: string, body: IpCommunity, options?: IpCommunitiesCreateOptionalParams): Promise, IpCommunitiesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, ipCommunityName: string, body: IpCommunity, options?: IpCommunitiesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, ipCommunityName: string, options?: IpCommunitiesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, ipCommunityName: string, options?: IpCommunitiesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, ipCommunityName: string, body: IpCommunityPatch, options?: IpCommunitiesUpdateOptionalParams): Promise, IpCommunitiesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, ipCommunityName: string, body: IpCommunityPatch, options?: IpCommunitiesUpdateOptionalParams): Promise; + get(resourceGroupName: string, ipCommunityName: string, options?: IpCommunitiesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: IpCommunitiesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: IpCommunitiesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface IpCommunitiesCreateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpCommunitiesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IpCommunitiesCreateResponse = IpCommunity; + +// @public +export interface IpCommunitiesDeleteHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpCommunitiesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface IpCommunitiesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpCommunitiesGetResponse = IpCommunity; + +// @public +export interface IpCommunitiesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpCommunitiesListByResourceGroupNextResponse = IpCommunitiesListResult; + +// @public +export interface IpCommunitiesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpCommunitiesListByResourceGroupResponse = IpCommunitiesListResult; + +// @public +export interface IpCommunitiesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpCommunitiesListBySubscriptionNextResponse = IpCommunitiesListResult; + +// @public +export interface IpCommunitiesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpCommunitiesListBySubscriptionResponse = IpCommunitiesListResult; + +// @public +export interface IpCommunitiesListResult { + nextLink?: string; + value?: IpCommunity[]; +} + +// @public +export interface IpCommunitiesUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpCommunitiesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IpCommunitiesUpdateResponse = IpCommunity; + +// @public +export interface IpCommunity extends TrackedResource { + action?: CommunityActionTypes; + annotation?: string; + communityMembers?: string[]; + readonly provisioningState?: ProvisioningState; + wellKnownCommunities?: WellKnownCommunities[]; +} + +// @public +export interface IpCommunityAddOperationProperties { + add?: IpCommunityIdList; +} + +// @public +export interface IpCommunityDeleteOperationProperties { + delete?: IpCommunityIdList; +} + +// @public +export interface IpCommunityIdList { + ipCommunityIds?: string[]; +} + +// @public +export interface IpCommunityPatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface IpCommunityProperties extends AnnotationResource { + action: CommunityActionTypes; + communityMembers: string[]; + readonly provisioningState?: ProvisioningState; + wellKnownCommunities?: WellKnownCommunities[]; +} + +// @public +export interface IpCommunitySetOperationProperties { + set?: IpCommunityIdList; +} + +// @public +export interface IpExtendedCommunities { + beginCreate(resourceGroupName: string, ipExtendedCommunityName: string, body: IpExtendedCommunity, options?: IpExtendedCommunitiesCreateOptionalParams): Promise, IpExtendedCommunitiesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, ipExtendedCommunityName: string, body: IpExtendedCommunity, options?: IpExtendedCommunitiesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, ipExtendedCommunityName: string, options?: IpExtendedCommunitiesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, ipExtendedCommunityName: string, options?: IpExtendedCommunitiesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, ipExtendedCommunityName: string, body: IpExtendedCommunityPatch, options?: IpExtendedCommunitiesUpdateOptionalParams): Promise, IpExtendedCommunitiesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, ipExtendedCommunityName: string, body: IpExtendedCommunityPatch, options?: IpExtendedCommunitiesUpdateOptionalParams): Promise; + get(resourceGroupName: string, ipExtendedCommunityName: string, options?: IpExtendedCommunitiesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: IpExtendedCommunitiesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: IpExtendedCommunitiesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface IpExtendedCommunitiesCreateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpExtendedCommunitiesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IpExtendedCommunitiesCreateResponse = IpExtendedCommunity; + +// @public +export interface IpExtendedCommunitiesDeleteHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpExtendedCommunitiesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface IpExtendedCommunitiesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpExtendedCommunitiesGetResponse = IpExtendedCommunity; + +// @public +export interface IpExtendedCommunitiesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpExtendedCommunitiesListByResourceGroupNextResponse = IpExtendedCommunityListResult; + +// @public +export interface IpExtendedCommunitiesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpExtendedCommunitiesListByResourceGroupResponse = IpExtendedCommunityListResult; + +// @public +export interface IpExtendedCommunitiesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpExtendedCommunitiesListBySubscriptionNextResponse = IpExtendedCommunityListResult; + +// @public +export interface IpExtendedCommunitiesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpExtendedCommunitiesListBySubscriptionResponse = IpExtendedCommunityListResult; + +// @public +export interface IpExtendedCommunitiesUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpExtendedCommunitiesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IpExtendedCommunitiesUpdateResponse = IpExtendedCommunity; + +// @public +export interface IpExtendedCommunity extends TrackedResource { + action?: CommunityActionTypes; + annotation?: string; + readonly provisioningState?: ProvisioningState; + routeTargets?: string[]; +} + +// @public +export interface IpExtendedCommunityAddOperationProperties { + add?: IpExtendedCommunityIdList; +} + +// @public +export interface IpExtendedCommunityDeleteOperationProperties { + delete?: IpExtendedCommunityIdList; +} + +// @public +export interface IpExtendedCommunityIdList { + ipExtendedCommunityIds?: string[]; +} + +// @public +export interface IpExtendedCommunityListResult { + nextLink?: string; + value?: IpExtendedCommunity[]; +} + +// @public +export interface IpExtendedCommunityPatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface IpExtendedCommunityProperties extends AnnotationResource { + action: CommunityActionTypes; + readonly provisioningState?: ProvisioningState; + routeTargets: string[]; +} + +// @public +export interface IpExtendedCommunitySetOperationProperties { + set?: IpExtendedCommunityIdList; +} + +// @public +export interface IpPrefix extends TrackedResource { + annotation?: string; + ipPrefixRules: IpPrefixPropertiesIpPrefixRulesItem[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface IpPrefixes { + beginCreate(resourceGroupName: string, ipPrefixName: string, body: IpPrefix, options?: IpPrefixesCreateOptionalParams): Promise, IpPrefixesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, ipPrefixName: string, body: IpPrefix, options?: IpPrefixesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, ipPrefixName: string, options?: IpPrefixesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, ipPrefixName: string, options?: IpPrefixesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, ipPrefixName: string, body: IpPrefixPatch, options?: IpPrefixesUpdateOptionalParams): Promise, IpPrefixesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, ipPrefixName: string, body: IpPrefixPatch, options?: IpPrefixesUpdateOptionalParams): Promise; + get(resourceGroupName: string, ipPrefixName: string, options?: IpPrefixesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: IpPrefixesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: IpPrefixesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface IpPrefixesCreateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpPrefixesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IpPrefixesCreateResponse = IpPrefix; + +// @public +export interface IpPrefixesDeleteHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpPrefixesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface IpPrefixesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpPrefixesGetResponse = IpPrefix; + +// @public +export interface IpPrefixesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpPrefixesListByResourceGroupNextResponse = IpPrefixesListResult; + +// @public +export interface IpPrefixesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpPrefixesListByResourceGroupResponse = IpPrefixesListResult; + +// @public +export interface IpPrefixesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpPrefixesListBySubscriptionNextResponse = IpPrefixesListResult; + +// @public +export interface IpPrefixesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IpPrefixesListBySubscriptionResponse = IpPrefixesListResult; + +// @public +export interface IpPrefixesListResult { + nextLink?: string; + value?: IpPrefix[]; +} + +// @public +export interface IpPrefixesUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface IpPrefixesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type IpPrefixesUpdateResponse = IpPrefix; + +// @public +export interface IpPrefixPatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface IpPrefixProperties extends AnnotationResource { + ipPrefixRules: IpPrefixPropertiesIpPrefixRulesItem[]; + readonly provisioningState?: ProvisioningState; +} + +// @public (undocumented) +export interface IpPrefixPropertiesIpPrefixRulesItem { + action: CommunityActionTypes; + condition?: Condition; + networkPrefix: string; + sequenceNumber: number; + subnetMaskLength?: number; +} + +// @public +export type IsCurrentVersion = string; + +// @public +export type IsTestVersion = string; + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownAddressFamily { + Ipv4 = "ipv4", + Ipv6 = "ipv6" +} + +// @public +export enum KnownAdministrativeState { + Disable = "Disable", + Enable = "Enable" +} + +// @public +export enum KnownAllowASOverride { + Disable = "Disable", + Enable = "Enable" +} + +// @public +export enum KnownBooleanEnumProperty { + False = "False", + True = "True" +} + +// @public +export enum KnownCommunityActionTypes { + Deny = "Deny", + Permit = "Permit" +} + +// @public +export enum KnownCondition { + EqualTo = "EqualTo", + GreaterThanOrEqualTo = "GreaterThanOrEqualTo", + LesserThanOrEqualTo = "LesserThanOrEqualTo" +} + +// @public +export enum KnownConditionActionType { + Allow = "allow", + Deny = "deny" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownEnabledDisabledState { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownExpressRouteConnectionState { + Connected = "Connected", + Connecting = "Connecting", + Disconnected = "Disconnected" +} + +// @public +export enum KnownFailedSucceededState { + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownInterfaceType { + Data = "Data", + Management = "Management" +} + +// @public +export enum KnownIsCurrentVersion { + False = "false", + True = "true" +} + +// @public +export enum KnownIsTestVersion { + False = "false", + True = "true" +} + +// @public +export enum KnownNetworkDeviceRackRoleType { + CE = "CE", + Management = "Management", + NPB = "NPB", + ToR = "ToR", + TS = "TS" +} + +// @public +export enum KnownNetworkDeviceRoleName { + CE = "CE", + Management = "Management", + NPB = "NPB", + ToR = "ToR", + TS = "TS" +} + +// @public +export enum KnownNetworkDeviceRoleTypes { + CE = "CE", + Management = "Management", + NPB = "NPB", + ToR = "ToR", + TS = "TS" +} + +// @public +export enum KnownNetworkFabricControllerOperationalState { + Configuring = "Configuring", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownNetworkFabricOperationalState { + DeferredControl = "DeferredControl", + Deprovisioned = "Deprovisioned", + Deprovisioning = "Deprovisioning", + ErrorDeprovisioning = "ErrorDeprovisioning", + ErrorProvisioning = "ErrorProvisioning", + Provisioned = "Provisioned", + Provisioning = "Provisioning" +} + +// @public +export enum KnownNetworkRackRoleName { + AggregateRack = "AggregateRack", + ComputeRack = "ComputeRack" +} + +// @public +export enum KnownNniType { + CE = "CE", + NPB = "NPB" +} + +// @public +export enum KnownOperationalState { + Configuring = "Configuring", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownOperationalStatus { + Booted = "Booted", + BootPrompt = "BootPrompt", + Ztp = "Ztp" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownPeeringOption { + OptionA = "OptionA", + OptionB = "OptionB" +} + +// @public +export enum KnownPowerCycleState { + Off = "Off", + On = "On" +} + +// @public +export enum KnownPowerEnd { + Primary = "Primary", + Secondary = "Secondary" +} + +// @public +export enum KnownProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownReachabilityState { + Reachable = "Reachable", + Unreachable = "Unreachable" +} + +// @public +export enum KnownRedistributeConnectedSubnets { + False = "False", + True = "True" +} + +// @public +export enum KnownRedistributeStaticRoutes { + False = "False", + True = "True" +} + +// @public +export enum KnownState { + Off = "Off", + On = "On" +} + +// @public +export enum KnownTerminalServerConnectivityState { + Ipv4Reachable = "Ipv4Reachable", + Ipv4Unreachable = "Ipv4Unreachable" +} + +// @public +export enum KnownWellKnownCommunities { + GShut = "GShut", + Internet = "Internet", + LocalAS = "LocalAS", + NoAdvertise = "NoAdvertise", + NoExport = "NoExport" +} + +// @public +export interface L2IsolationDomain extends TrackedResource { + readonly administrativeState?: EnabledDisabledState; + annotation?: string; + readonly disabledOnResources?: string[]; + mtu?: number; + networkFabricId?: string; + readonly provisioningState?: ProvisioningState; + vlanId?: number; +} + +// @public +export interface L2IsolationDomainPatch { + annotation?: string; + mtu?: number; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface L2IsolationDomainPatchProperties extends AnnotationResource { + mtu?: number; +} + +// @public +export interface L2IsolationDomainProperties extends AnnotationResource { + readonly administrativeState?: EnabledDisabledState; + readonly disabledOnResources?: string[]; + mtu?: number; + networkFabricId: string; + readonly provisioningState?: ProvisioningState; + vlanId: number; +} + +// @public +export interface L2IsolationDomains { + beginClearArpTable(resourceGroupName: string, l2IsolationDomainName: string, body: EnableDisableOnResources, options?: L2IsolationDomainsClearArpTableOptionalParams): Promise, L2IsolationDomainsClearArpTableResponse>>; + beginClearArpTableAndWait(resourceGroupName: string, l2IsolationDomainName: string, body: EnableDisableOnResources, options?: L2IsolationDomainsClearArpTableOptionalParams): Promise; + beginClearNeighborTable(resourceGroupName: string, l2IsolationDomainName: string, body: EnableDisableOnResources, options?: L2IsolationDomainsClearNeighborTableOptionalParams): Promise, L2IsolationDomainsClearNeighborTableResponse>>; + beginClearNeighborTableAndWait(resourceGroupName: string, l2IsolationDomainName: string, body: EnableDisableOnResources, options?: L2IsolationDomainsClearNeighborTableOptionalParams): Promise; + beginCreate(resourceGroupName: string, l2IsolationDomainName: string, body: L2IsolationDomain, options?: L2IsolationDomainsCreateOptionalParams): Promise, L2IsolationDomainsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, l2IsolationDomainName: string, body: L2IsolationDomain, options?: L2IsolationDomainsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, l2IsolationDomainName: string, options?: L2IsolationDomainsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, l2IsolationDomainName: string, options?: L2IsolationDomainsDeleteOptionalParams): Promise; + beginGetArpEntries(resourceGroupName: string, l2IsolationDomainName: string, options?: L2IsolationDomainsGetArpEntriesOptionalParams): Promise, L2IsolationDomainsGetArpEntriesResponse>>; + beginGetArpEntriesAndWait(resourceGroupName: string, l2IsolationDomainName: string, options?: L2IsolationDomainsGetArpEntriesOptionalParams): Promise; + beginUpdate(resourceGroupName: string, l2IsolationDomainName: string, body: L2IsolationDomainPatch, options?: L2IsolationDomainsUpdateOptionalParams): Promise, L2IsolationDomainsUpdateResponse>>; + beginUpdateAdministrativeState(resourceGroupName: string, l2IsolationDomainName: string, body: UpdateAdministrativeState, options?: L2IsolationDomainsUpdateAdministrativeStateOptionalParams): Promise, L2IsolationDomainsUpdateAdministrativeStateResponse>>; + beginUpdateAdministrativeStateAndWait(resourceGroupName: string, l2IsolationDomainName: string, body: UpdateAdministrativeState, options?: L2IsolationDomainsUpdateAdministrativeStateOptionalParams): Promise; + beginUpdateAndWait(resourceGroupName: string, l2IsolationDomainName: string, body: L2IsolationDomainPatch, options?: L2IsolationDomainsUpdateOptionalParams): Promise; + get(resourceGroupName: string, l2IsolationDomainName: string, options?: L2IsolationDomainsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: L2IsolationDomainsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: L2IsolationDomainsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface L2IsolationDomainsClearArpTableHeaders { + location?: string; +} + +// @public +export interface L2IsolationDomainsClearArpTableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L2IsolationDomainsClearArpTableResponse = L2IsolationDomainsClearArpTableHeaders; + +// @public +export interface L2IsolationDomainsClearNeighborTableHeaders { + location?: string; +} + +// @public +export interface L2IsolationDomainsClearNeighborTableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L2IsolationDomainsClearNeighborTableResponse = L2IsolationDomainsClearNeighborTableHeaders; + +// @public +export interface L2IsolationDomainsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L2IsolationDomainsCreateResponse = L2IsolationDomain; + +// @public +export interface L2IsolationDomainsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface L2IsolationDomainsGetArpEntriesHeaders { + location?: string; +} + +// @public +export interface L2IsolationDomainsGetArpEntriesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L2IsolationDomainsGetArpEntriesResponse = L2IsolationDomainsGetArpEntriesHeaders & { + [propertyName: string]: ARPProperties; +}; + +// @public +export interface L2IsolationDomainsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L2IsolationDomainsGetResponse = L2IsolationDomain; + +// @public +export interface L2IsolationDomainsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L2IsolationDomainsListByResourceGroupNextResponse = L2IsolationDomainsListResult; + +// @public +export interface L2IsolationDomainsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L2IsolationDomainsListByResourceGroupResponse = L2IsolationDomainsListResult; + +// @public +export interface L2IsolationDomainsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L2IsolationDomainsListBySubscriptionNextResponse = L2IsolationDomainsListResult; + +// @public +export interface L2IsolationDomainsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L2IsolationDomainsListBySubscriptionResponse = L2IsolationDomainsListResult; + +// @public +export interface L2IsolationDomainsListResult { + nextLink?: string; + value?: L2IsolationDomain[]; +} + +// @public +export interface L2IsolationDomainsUpdateAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface L2IsolationDomainsUpdateAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L2IsolationDomainsUpdateAdministrativeStateResponse = L2IsolationDomainsUpdateAdministrativeStateHeaders; + +// @public +export interface L2IsolationDomainsUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface L2IsolationDomainsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L2IsolationDomainsUpdateResponse = L2IsolationDomain; + +// @public +export interface L3IsolationDomain extends TrackedResource { + readonly administrativeState?: EnabledDisabledState; + aggregateRouteConfiguration?: AggregateRouteConfiguration; + annotation?: string; + connectedSubnetRoutePolicy?: L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; + description?: string; + readonly disabledOnResources?: string[]; + networkFabricId?: string; + readonly optionBDisabledOnResources?: string[]; + readonly provisioningState?: ProvisioningState; + redistributeConnectedSubnets?: RedistributeConnectedSubnets; + redistributeStaticRoutes?: RedistributeStaticRoutes; +} + +// @public +export interface L3IsolationDomainPatch { + aggregateRouteConfiguration?: AggregateRouteConfiguration; + connectedSubnetRoutePolicy?: L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; + description?: string; + redistributeConnectedSubnets?: RedistributeConnectedSubnets; + redistributeStaticRoutes?: RedistributeStaticRoutes; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface L3IsolationDomainPatchProperties { + aggregateRouteConfiguration?: AggregateRouteConfiguration; + connectedSubnetRoutePolicy?: L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; + description?: string; + redistributeConnectedSubnets?: RedistributeConnectedSubnets; + redistributeStaticRoutes?: RedistributeStaticRoutes; +} + +// @public +export interface L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy { + readonly administrativeState?: EnabledDisabledState; + exportRoutePolicyId?: string; +} + +// @public +export interface L3IsolationDomainProperties extends AnnotationResource, L3IsolationDomainPatchProperties { + readonly administrativeState?: EnabledDisabledState; + readonly disabledOnResources?: string[]; + networkFabricId: string; + readonly optionBDisabledOnResources?: string[]; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface L3IsolationDomains { + beginClearArpTable(resourceGroupName: string, l3IsolationDomainName: string, body: EnableDisableOnResources, options?: L3IsolationDomainsClearArpTableOptionalParams): Promise, L3IsolationDomainsClearArpTableResponse>>; + beginClearArpTableAndWait(resourceGroupName: string, l3IsolationDomainName: string, body: EnableDisableOnResources, options?: L3IsolationDomainsClearArpTableOptionalParams): Promise; + beginClearNeighborTable(resourceGroupName: string, l3IsolationDomainName: string, body: EnableDisableOnResources, options?: L3IsolationDomainsClearNeighborTableOptionalParams): Promise, L3IsolationDomainsClearNeighborTableResponse>>; + beginClearNeighborTableAndWait(resourceGroupName: string, l3IsolationDomainName: string, body: EnableDisableOnResources, options?: L3IsolationDomainsClearNeighborTableOptionalParams): Promise; + beginCreate(resourceGroupName: string, l3IsolationDomainName: string, body: L3IsolationDomain, options?: L3IsolationDomainsCreateOptionalParams): Promise, L3IsolationDomainsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, l3IsolationDomainName: string, body: L3IsolationDomain, options?: L3IsolationDomainsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, l3IsolationDomainName: string, options?: L3IsolationDomainsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, l3IsolationDomainName: string, options?: L3IsolationDomainsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, l3IsolationDomainName: string, body: L3IsolationDomainPatch, options?: L3IsolationDomainsUpdateOptionalParams): Promise, L3IsolationDomainsUpdateResponse>>; + beginUpdateAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, body: UpdateAdministrativeState, options?: L3IsolationDomainsUpdateAdministrativeStateOptionalParams): Promise, L3IsolationDomainsUpdateAdministrativeStateResponse>>; + beginUpdateAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, body: UpdateAdministrativeState, options?: L3IsolationDomainsUpdateAdministrativeStateOptionalParams): Promise; + beginUpdateAndWait(resourceGroupName: string, l3IsolationDomainName: string, body: L3IsolationDomainPatch, options?: L3IsolationDomainsUpdateOptionalParams): Promise; + beginUpdateOptionBAdministrativeState(resourceGroupName: string, l3IsolationDomainName: string, body: UpdateAdministrativeState, options?: L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams): Promise, L3IsolationDomainsUpdateOptionBAdministrativeStateResponse>>; + beginUpdateOptionBAdministrativeStateAndWait(resourceGroupName: string, l3IsolationDomainName: string, body: UpdateAdministrativeState, options?: L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams): Promise; + get(resourceGroupName: string, l3IsolationDomainName: string, options?: L3IsolationDomainsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: L3IsolationDomainsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: L3IsolationDomainsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface L3IsolationDomainsClearArpTableHeaders { + location?: string; +} + +// @public +export interface L3IsolationDomainsClearArpTableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L3IsolationDomainsClearArpTableResponse = L3IsolationDomainsClearArpTableHeaders; + +// @public +export interface L3IsolationDomainsClearNeighborTableHeaders { + location?: string; +} + +// @public +export interface L3IsolationDomainsClearNeighborTableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L3IsolationDomainsClearNeighborTableResponse = L3IsolationDomainsClearNeighborTableHeaders; + +// @public +export interface L3IsolationDomainsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L3IsolationDomainsCreateResponse = L3IsolationDomain; + +// @public +export interface L3IsolationDomainsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface L3IsolationDomainsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L3IsolationDomainsGetResponse = L3IsolationDomain; + +// @public +export interface L3IsolationDomainsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L3IsolationDomainsListByResourceGroupNextResponse = L3IsolationDomainsListResult; + +// @public +export interface L3IsolationDomainsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L3IsolationDomainsListByResourceGroupResponse = L3IsolationDomainsListResult; + +// @public +export interface L3IsolationDomainsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L3IsolationDomainsListBySubscriptionNextResponse = L3IsolationDomainsListResult; + +// @public +export interface L3IsolationDomainsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type L3IsolationDomainsListBySubscriptionResponse = L3IsolationDomainsListResult; + +// @public +export interface L3IsolationDomainsListResult { + nextLink?: string; + value?: L3IsolationDomain[]; +} + +// @public +export interface L3IsolationDomainsUpdateAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface L3IsolationDomainsUpdateAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L3IsolationDomainsUpdateAdministrativeStateResponse = L3IsolationDomainsUpdateAdministrativeStateHeaders; + +// @public +export interface L3IsolationDomainsUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface L3IsolationDomainsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type L3IsolationDomainsUpdateOptionBAdministrativeStateResponse = L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders; + +// @public +export type L3IsolationDomainsUpdateResponse = L3IsolationDomain; + +// @public +export interface Layer2Configuration { + readonly interfaces?: string[]; + mtu: number; + portCount?: number; +} + +// @public +export interface Layer3Configuration extends Layer3IpPrefixProperties { + exportRoutePolicyId?: string; + readonly fabricASN?: number; + importRoutePolicyId?: string; + peerASN?: number; + vlanId?: number; +} + +// @public +export interface Layer3IpPrefixProperties { + primaryIpv4Prefix?: string; + primaryIpv6Prefix?: string; + secondaryIpv4Prefix?: string; + secondaryIpv6Prefix?: string; +} + +// @public +export interface Layer3OptionAProperties extends Layer3IpPrefixProperties { + bfdConfiguration?: BfdConfiguration; + readonly fabricASN?: number; + mtu?: number; + peerASN?: number; + vlanId?: number; +} + +// @public +export interface ManagedResourceGroupConfiguration { + location?: string; + name?: string; +} + +// @public +export interface ManagementNetworkConfiguration { + infrastructureVpnConfiguration: VpnConfigurationProperties; + workloadVpnConfiguration: VpnConfigurationProperties; +} + +// @public +export interface NeighborAddress { + address?: string; + readonly operationalState?: string; +} + +// @public +export interface NetworkDevice extends TrackedResource { + annotation?: string; + hostName?: string; + networkDeviceRole?: NetworkDeviceRoleTypes; + networkDeviceSku?: string; + readonly networkRackId?: string; + readonly provisioningState?: ProvisioningState; + serialNumber?: string; + readonly version?: string; +} + +// @public +export interface NetworkDevicePatchableProperties { + hostName?: string; + serialNumber?: string; +} + +// @public +export interface NetworkDevicePatchParameters { + annotation?: string; + hostName?: string; + serialNumber?: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface NetworkDevicePatchParametersProperties extends AnnotationResource, NetworkDevicePatchableProperties { +} + +// @public +export interface NetworkDeviceProperties extends AnnotationResource, NetworkDevicePatchableProperties { + networkDeviceRole: NetworkDeviceRoleTypes; + networkDeviceSku: string; + readonly networkRackId?: string; + readonly provisioningState?: ProvisioningState; + readonly version?: string; +} + +// @public +export type NetworkDeviceRackRoleType = string; + +// @public +export type NetworkDeviceRoleName = string; + +// @public +export interface NetworkDeviceRoleProperties { + networkDeviceSkuName?: string; + rackSlot?: number; + roleType?: NetworkDeviceRackRoleType; +} + +// @public +export type NetworkDeviceRoleTypes = string; + +// @public +export interface NetworkDevices { + beginCreate(resourceGroupName: string, networkDeviceName: string, body: NetworkDevice, options?: NetworkDevicesCreateOptionalParams): Promise, NetworkDevicesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, networkDeviceName: string, body: NetworkDevice, options?: NetworkDevicesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesDeleteOptionalParams): Promise; + beginGenerateSupportPackage(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGenerateSupportPackageOptionalParams): Promise, NetworkDevicesGenerateSupportPackageResponse>>; + beginGenerateSupportPackageAndWait(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGenerateSupportPackageOptionalParams): Promise; + beginGetDynamicInterfaceMaps(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGetDynamicInterfaceMapsOptionalParams): Promise, NetworkDevicesGetDynamicInterfaceMapsResponse>>; + beginGetDynamicInterfaceMapsAndWait(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGetDynamicInterfaceMapsOptionalParams): Promise; + beginGetStaticInterfaceMaps(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGetStaticInterfaceMapsOptionalParams): Promise, NetworkDevicesGetStaticInterfaceMapsResponse>>; + beginGetStaticInterfaceMapsAndWait(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGetStaticInterfaceMapsOptionalParams): Promise; + beginGetStatus(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGetStatusOptionalParams): Promise, NetworkDevicesGetStatusResponse>>; + beginGetStatusAndWait(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGetStatusOptionalParams): Promise; + beginReboot(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesRebootOptionalParams): Promise, NetworkDevicesRebootResponse>>; + beginRebootAndWait(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesRebootOptionalParams): Promise; + beginRestoreConfig(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesRestoreConfigOptionalParams): Promise, NetworkDevicesRestoreConfigResponse>>; + beginRestoreConfigAndWait(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesRestoreConfigOptionalParams): Promise; + beginUpdate(resourceGroupName: string, networkDeviceName: string, body: NetworkDevicePatchParameters, options?: NetworkDevicesUpdateOptionalParams): Promise, NetworkDevicesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, networkDeviceName: string, body: NetworkDevicePatchParameters, options?: NetworkDevicesUpdateOptionalParams): Promise; + beginUpdatePowerCycle(resourceGroupName: string, networkDeviceName: string, body: UpdatePowerCycleProperties, options?: NetworkDevicesUpdatePowerCycleOptionalParams): Promise, NetworkDevicesUpdatePowerCycleResponse>>; + beginUpdatePowerCycleAndWait(resourceGroupName: string, networkDeviceName: string, body: UpdatePowerCycleProperties, options?: NetworkDevicesUpdatePowerCycleOptionalParams): Promise; + beginUpdateVersion(resourceGroupName: string, networkDeviceName: string, body: UpdateVersionProperties, options?: NetworkDevicesUpdateVersionOptionalParams): Promise, NetworkDevicesUpdateVersionResponse>>; + beginUpdateVersionAndWait(resourceGroupName: string, networkDeviceName: string, body: UpdateVersionProperties, options?: NetworkDevicesUpdateVersionOptionalParams): Promise; + get(resourceGroupName: string, networkDeviceName: string, options?: NetworkDevicesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: NetworkDevicesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: NetworkDevicesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkDevicesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesCreateResponse = NetworkDevice; + +// @public +export interface NetworkDevicesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkDevicesGenerateSupportPackageHeaders { + location?: string; +} + +// @public +export interface NetworkDevicesGenerateSupportPackageOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesGenerateSupportPackageResponse = NetworkDevicesGenerateSupportPackageHeaders & SupportPackageProperties; + +// @public +export interface NetworkDevicesGetDynamicInterfaceMapsHeaders { + location?: string; +} + +// @public +export interface NetworkDevicesGetDynamicInterfaceMapsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesGetDynamicInterfaceMapsResponse = NetworkDevicesGetDynamicInterfaceMapsHeaders & GetDynamicInterfaceMapsPropertiesItem[]; + +// @public +export interface NetworkDevicesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkDevicesGetResponse = NetworkDevice; + +// @public +export interface NetworkDevicesGetStaticInterfaceMapsHeaders { + location?: string; +} + +// @public +export interface NetworkDevicesGetStaticInterfaceMapsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesGetStaticInterfaceMapsResponse = NetworkDevicesGetStaticInterfaceMapsHeaders & GetStaticInterfaceMapsPropertiesItem[]; + +// @public +export interface NetworkDevicesGetStatusHeaders { + location?: string; +} + +// @public +export interface NetworkDevicesGetStatusOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesGetStatusResponse = NetworkDevicesGetStatusHeaders & GetDeviceStatusProperties; + +// @public +export interface NetworkDeviceSku extends ProxyResource { + interfaces?: DeviceInterfaceProperties[]; + limits?: DeviceLimits; + manufacturer?: string; + model: string; + readonly provisioningState?: ProvisioningState; + supportedRoleTypes?: NetworkDeviceRoleName[]; + supportedVersions?: SupportedVersionProperties[]; +} + +// @public +export interface NetworkDeviceSkus { + get(networkDeviceSkuName: string, options?: NetworkDeviceSkusGetOptionalParams): Promise; + listBySubscription(options?: NetworkDeviceSkusListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkDeviceSkusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkDeviceSkusGetResponse = NetworkDeviceSku; + +// @public +export interface NetworkDeviceSkusListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkDeviceSkusListBySubscriptionNextResponse = NetworkDeviceSkusListResult; + +// @public +export interface NetworkDeviceSkusListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkDeviceSkusListBySubscriptionResponse = NetworkDeviceSkusListResult; + +// @public +export interface NetworkDeviceSkusListResult { + nextLink?: string; + value?: NetworkDeviceSku[]; +} + +// @public +export interface NetworkDevicesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkDevicesListByResourceGroupNextResponse = NetworkDevicesListResult; + +// @public +export interface NetworkDevicesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkDevicesListByResourceGroupResponse = NetworkDevicesListResult; + +// @public +export interface NetworkDevicesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkDevicesListBySubscriptionNextResponse = NetworkDevicesListResult; + +// @public +export interface NetworkDevicesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkDevicesListBySubscriptionResponse = NetworkDevicesListResult; + +// @public +export interface NetworkDevicesListResult { + nextLink?: string; + value?: NetworkDevice[]; +} + +// @public +export interface NetworkDevicesRebootHeaders { + location?: string; +} + +// @public +export interface NetworkDevicesRebootOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesRebootResponse = NetworkDevicesRebootHeaders; + +// @public +export interface NetworkDevicesRestoreConfigHeaders { + location?: string; +} + +// @public +export interface NetworkDevicesRestoreConfigOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesRestoreConfigResponse = NetworkDevicesRestoreConfigHeaders; + +// @public +export interface NetworkDevicesUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface NetworkDevicesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkDevicesUpdatePowerCycleHeaders { + location?: string; +} + +// @public +export interface NetworkDevicesUpdatePowerCycleOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesUpdatePowerCycleResponse = NetworkDevicesUpdatePowerCycleHeaders; + +// @public +export type NetworkDevicesUpdateResponse = NetworkDevice; + +// @public +export interface NetworkDevicesUpdateVersionHeaders { + location?: string; +} + +// @public +export interface NetworkDevicesUpdateVersionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkDevicesUpdateVersionResponse = NetworkDevicesUpdateVersionHeaders; + +// @public +export interface NetworkFabric extends TrackedResource { + annotation?: string; + fabricASN?: number; + ipv4Prefix?: string; + ipv6Prefix?: string; + readonly l2IsolationDomains?: string[]; + readonly l3IsolationDomains?: string[]; + managementNetworkConfiguration?: ManagementNetworkConfiguration; + networkFabricControllerId?: string; + networkFabricSku?: string; + readonly operationalState?: NetworkFabricOperationalState; + readonly provisioningState?: ProvisioningState; + rackCount?: number; + readonly racks?: string[]; + readonly routerId?: string; + serverCountPerRack?: number; + terminalServerConfiguration?: TerminalServerConfiguration; +} + +// @public +export interface NetworkFabricController extends TrackedResource { + annotation?: string; + infrastructureExpressRouteConnections?: ExpressRouteConnectionInformation[]; + readonly infrastructureServices?: InfrastructureServices; + ipv4AddressSpace?: string; + ipv6AddressSpace?: string; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + readonly networkFabricIds?: string[]; + readonly operationalState?: NetworkFabricControllerOperationalState; + readonly provisioningState?: ProvisioningState; + workloadExpressRouteConnections?: ExpressRouteConnectionInformation[]; + readonly workloadManagementNetwork?: boolean; + readonly workloadServices?: WorkloadServices; +} + +// @public +export type NetworkFabricControllerOperationalState = string; + +// @public +export interface NetworkFabricControllerPatch { + infrastructureExpressRouteConnections?: ExpressRouteConnectionInformation[]; + tags?: { + [propertyName: string]: string; + }; + workloadExpressRouteConnections?: ExpressRouteConnectionInformation[]; +} + +// @public +export interface NetworkFabricControllerPatchableProperties { + infrastructureExpressRouteConnections?: ExpressRouteConnectionInformation[]; + workloadExpressRouteConnections?: ExpressRouteConnectionInformation[]; +} + +// @public +export interface NetworkFabricControllerProperties extends AnnotationResource, NetworkFabricControllerPatchableProperties { + readonly infrastructureServices?: InfrastructureServices; + ipv4AddressSpace?: string; + ipv6AddressSpace?: string; + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + readonly networkFabricIds?: string[]; + readonly operationalState?: NetworkFabricControllerOperationalState; + readonly provisioningState?: ProvisioningState; + readonly workloadManagementNetwork?: boolean; + readonly workloadServices?: WorkloadServices; +} + +// @public +export interface NetworkFabricControllers { + beginCreate(resourceGroupName: string, networkFabricControllerName: string, body: NetworkFabricController, options?: NetworkFabricControllersCreateOptionalParams): Promise, NetworkFabricControllersCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, networkFabricControllerName: string, body: NetworkFabricController, options?: NetworkFabricControllersCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, networkFabricControllerName: string, options?: NetworkFabricControllersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, networkFabricControllerName: string, options?: NetworkFabricControllersDeleteOptionalParams): Promise; + beginDisableWorkloadManagementNetwork(resourceGroupName: string, networkFabricControllerName: string, options?: NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams): Promise, NetworkFabricControllersDisableWorkloadManagementNetworkResponse>>; + beginDisableWorkloadManagementNetworkAndWait(resourceGroupName: string, networkFabricControllerName: string, options?: NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams): Promise; + beginEnableWorkloadManagementNetwork(resourceGroupName: string, networkFabricControllerName: string, options?: NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams): Promise, NetworkFabricControllersEnableWorkloadManagementNetworkResponse>>; + beginEnableWorkloadManagementNetworkAndWait(resourceGroupName: string, networkFabricControllerName: string, options?: NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams): Promise; + beginUpdate(resourceGroupName: string, networkFabricControllerName: string, body: NetworkFabricControllerPatch, options?: NetworkFabricControllersUpdateOptionalParams): Promise, NetworkFabricControllersUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, networkFabricControllerName: string, body: NetworkFabricControllerPatch, options?: NetworkFabricControllersUpdateOptionalParams): Promise; + get(resourceGroupName: string, networkFabricControllerName: string, options?: NetworkFabricControllersGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: NetworkFabricControllersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: NetworkFabricControllersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkFabricControllersCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkFabricControllersCreateResponse = NetworkFabricController; + +// @public +export interface NetworkFabricControllersDeleteHeaders { + location?: string; +} + +// @public +export interface NetworkFabricControllersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkFabricControllersDisableWorkloadManagementNetworkHeaders { + location?: string; +} + +// @public +export interface NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkFabricControllersDisableWorkloadManagementNetworkResponse = NetworkFabricControllersDisableWorkloadManagementNetworkHeaders; + +// @public +export interface NetworkFabricControllersEnableWorkloadManagementNetworkHeaders { + location?: string; +} + +// @public +export interface NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkFabricControllersEnableWorkloadManagementNetworkResponse = NetworkFabricControllersEnableWorkloadManagementNetworkHeaders; + +// @public +export interface NetworkFabricControllersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricControllersGetResponse = NetworkFabricController; + +// @public +export interface NetworkFabricControllersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricControllersListByResourceGroupNextResponse = NetworkFabricControllersListResult; + +// @public +export interface NetworkFabricControllersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricControllersListByResourceGroupResponse = NetworkFabricControllersListResult; + +// @public +export interface NetworkFabricControllersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricControllersListBySubscriptionNextResponse = NetworkFabricControllersListResult; + +// @public +export interface NetworkFabricControllersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricControllersListBySubscriptionResponse = NetworkFabricControllersListResult; + +// @public +export interface NetworkFabricControllersListResult { + nextLink?: string; + value?: NetworkFabricController[]; +} + +// @public +export interface NetworkFabricControllersUpdateHeaders { + location?: string; +} + +// @public +export interface NetworkFabricControllersUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkFabricControllersUpdateResponse = NetworkFabricController; + +// @public +export type NetworkFabricOperationalState = string; + +// @public +export interface NetworkFabricPatchableProperties { + readonly l2IsolationDomains?: string[]; + readonly l3IsolationDomains?: string[]; + readonly racks?: string[]; +} + +// @public +export interface NetworkFabricPatchParameters { + annotation?: string; + readonly l2IsolationDomains?: string[]; + readonly l3IsolationDomains?: string[]; + readonly racks?: string[]; + tags?: { + [propertyName: string]: string; + }; + terminalServerConfiguration?: TerminalServerPatchableProperties; +} + +// @public +export interface NetworkFabricPatchParametersProperties extends AnnotationResource, TerminalServerPatchParameters, NetworkFabricPatchableProperties { +} + +// @public +export interface NetworkFabricProperties extends AnnotationResource, NetworkFabricPatchableProperties { + fabricASN: number; + ipv4Prefix?: string; + ipv6Prefix?: string; + managementNetworkConfiguration: ManagementNetworkConfiguration; + networkFabricControllerId: string; + networkFabricSku: string; + readonly operationalState?: NetworkFabricOperationalState; + readonly provisioningState?: ProvisioningState; + rackCount: number; + readonly routerId?: string; + serverCountPerRack: number; + terminalServerConfiguration: TerminalServerConfiguration; +} + +// @public +export interface NetworkFabrics { + beginCreate(resourceGroupName: string, networkFabricName: string, body: NetworkFabric, options?: NetworkFabricsCreateOptionalParams): Promise, NetworkFabricsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, networkFabricName: string, body: NetworkFabric, options?: NetworkFabricsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, networkFabricName: string, options?: NetworkFabricsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, networkFabricName: string, options?: NetworkFabricsDeleteOptionalParams): Promise; + beginDeprovision(resourceGroupName: string, networkFabricName: string, options?: NetworkFabricsDeprovisionOptionalParams): Promise, NetworkFabricsDeprovisionResponse>>; + beginDeprovisionAndWait(resourceGroupName: string, networkFabricName: string, options?: NetworkFabricsDeprovisionOptionalParams): Promise; + beginProvision(resourceGroupName: string, networkFabricName: string, options?: NetworkFabricsProvisionOptionalParams): Promise, NetworkFabricsProvisionResponse>>; + beginProvisionAndWait(resourceGroupName: string, networkFabricName: string, options?: NetworkFabricsProvisionOptionalParams): Promise; + beginUpdate(resourceGroupName: string, networkFabricName: string, body: NetworkFabricPatchParameters, options?: NetworkFabricsUpdateOptionalParams): Promise, NetworkFabricsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, networkFabricName: string, body: NetworkFabricPatchParameters, options?: NetworkFabricsUpdateOptionalParams): Promise; + get(resourceGroupName: string, networkFabricName: string, options?: NetworkFabricsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: NetworkFabricsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: NetworkFabricsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkFabricsCreateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface NetworkFabricsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkFabricsCreateResponse = NetworkFabric; + +// @public +export interface NetworkFabricsDeleteHeaders { + location?: string; +} + +// @public +export interface NetworkFabricsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkFabricsDeprovisionHeaders { + location?: string; +} + +// @public +export interface NetworkFabricsDeprovisionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkFabricsDeprovisionResponse = NetworkFabricsDeprovisionHeaders; + +// @public +export interface NetworkFabricsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricsGetResponse = NetworkFabric; + +// @public +export interface NetworkFabricSku extends ProxyResource { + readonly detailsUri?: string; + maxComputeRacks?: number; + readonly maxSupportedVer?: string; + readonly minSupportedVer?: string; + readonly provisioningState?: ProvisioningState; + readonly typePropertiesType?: string; +} + +// @public +export interface NetworkFabricSkus { + get(networkFabricSkuName: string, options?: NetworkFabricSkusGetOptionalParams): Promise; + listBySubscription(options?: NetworkFabricSkusListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkFabricSkusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricSkusGetResponse = NetworkFabricSku; + +// @public +export interface NetworkFabricSkusListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricSkusListBySubscriptionNextResponse = NetworkFabricSkusListResult; + +// @public +export interface NetworkFabricSkusListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricSkusListBySubscriptionResponse = NetworkFabricSkusListResult; + +// @public +export interface NetworkFabricSkusListResult { + nextLink?: string; + value?: NetworkFabricSku[]; +} + +// @public +export interface NetworkFabricsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricsListByResourceGroupNextResponse = NetworkFabricsListResult; + +// @public +export interface NetworkFabricsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricsListByResourceGroupResponse = NetworkFabricsListResult; + +// @public +export interface NetworkFabricsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricsListBySubscriptionNextResponse = NetworkFabricsListResult; + +// @public +export interface NetworkFabricsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkFabricsListBySubscriptionResponse = NetworkFabricsListResult; + +// @public +export interface NetworkFabricsListResult { + nextLink?: string; + value?: NetworkFabric[]; +} + +// @public +export interface NetworkFabricsProvisionHeaders { + location?: string; +} + +// @public +export interface NetworkFabricsProvisionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkFabricsProvisionResponse = NetworkFabricsProvisionHeaders; + +// @public +export interface NetworkFabricsUpdateHeaders { + location?: string; +} + +// @public +export interface NetworkFabricsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkFabricsUpdateResponse = NetworkFabric; + +// @public +export interface NetworkInterface extends ProxyResource { + readonly administrativeState?: EnabledDisabledState; + annotation?: string; + readonly connectedTo?: string; + readonly interfaceType?: InterfaceType; + readonly ipv4Address?: string; + readonly ipv6Address?: string; + readonly physicalIdentifier?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface NetworkInterfacePatch { + annotation?: string; +} + +// @public +export interface NetworkInterfacePatchProperties extends AnnotationResource { +} + +// @public +export interface NetworkInterfaceProperties extends AnnotationResource { + readonly administrativeState?: EnabledDisabledState; + readonly connectedTo?: string; + readonly interfaceType?: InterfaceType; + readonly ipv4Address?: string; + readonly ipv6Address?: string; + readonly physicalIdentifier?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface NetworkInterfaces { + beginCreate(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, body: NetworkInterface, options?: NetworkInterfacesCreateOptionalParams): Promise, NetworkInterfacesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, body: NetworkInterface, options?: NetworkInterfacesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, options?: NetworkInterfacesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, options?: NetworkInterfacesDeleteOptionalParams): Promise; + beginGetStatus(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, options?: NetworkInterfacesGetStatusOptionalParams): Promise, NetworkInterfacesGetStatusResponse>>; + beginGetStatusAndWait(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, options?: NetworkInterfacesGetStatusOptionalParams): Promise; + beginUpdate(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, body: NetworkInterfacePatch, options?: NetworkInterfacesUpdateOptionalParams): Promise, NetworkInterfacesUpdateResponse>>; + beginUpdateAdministrativeState(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, body: UpdateAdministrativeState, options?: NetworkInterfacesUpdateAdministrativeStateOptionalParams): Promise, NetworkInterfacesUpdateAdministrativeStateResponse>>; + beginUpdateAdministrativeStateAndWait(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, body: UpdateAdministrativeState, options?: NetworkInterfacesUpdateAdministrativeStateOptionalParams): Promise; + beginUpdateAndWait(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, body: NetworkInterfacePatch, options?: NetworkInterfacesUpdateOptionalParams): Promise; + get(resourceGroupName: string, networkDeviceName: string, networkInterfaceName: string, options?: NetworkInterfacesGetOptionalParams): Promise; + list(resourceGroupName: string, networkDeviceName: string, options?: NetworkInterfacesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkInterfacesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkInterfacesCreateResponse = NetworkInterface; + +// @public +export interface NetworkInterfacesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkInterfacesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkInterfacesGetResponse = NetworkInterface; + +// @public +export interface NetworkInterfacesGetStatusHeaders { + location?: string; +} + +// @public +export interface NetworkInterfacesGetStatusOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkInterfacesGetStatusResponse = NetworkInterfacesGetStatusHeaders & InterfaceStatus; + +// @public +export interface NetworkInterfacesList { + nextLink?: string; + value?: NetworkInterface[]; +} + +// @public +export interface NetworkInterfacesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkInterfacesListNextResponse = NetworkInterfacesList; + +// @public +export interface NetworkInterfacesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkInterfacesListResponse = NetworkInterfacesList; + +// @public +export interface NetworkInterfacesUpdateAdministrativeStateHeaders { + location?: string; +} + +// @public +export interface NetworkInterfacesUpdateAdministrativeStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkInterfacesUpdateAdministrativeStateResponse = NetworkInterfacesUpdateAdministrativeStateHeaders; + +// @public +export interface NetworkInterfacesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkInterfacesUpdateResponse = NetworkInterface; + +// @public +export interface NetworkRack extends TrackedResource { + annotation?: string; + readonly networkDevices?: string[]; + networkFabricId: string; + networkRackSku: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface NetworkRackPatch { + properties?: Record; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface NetworkRackProperties extends AnnotationResource { + readonly networkDevices?: string[]; + networkFabricId: string; + networkRackSku: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export type NetworkRackRoleName = string; + +// @public +export interface NetworkRacks { + beginCreate(resourceGroupName: string, networkRackName: string, body: NetworkRack, options?: NetworkRacksCreateOptionalParams): Promise, NetworkRacksCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, networkRackName: string, body: NetworkRack, options?: NetworkRacksCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, networkRackName: string, options?: NetworkRacksDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, networkRackName: string, options?: NetworkRacksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, networkRackName: string, body: NetworkRackPatch, options?: NetworkRacksUpdateOptionalParams): Promise, NetworkRacksUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, networkRackName: string, body: NetworkRackPatch, options?: NetworkRacksUpdateOptionalParams): Promise; + get(resourceGroupName: string, networkRackName: string, options?: NetworkRacksGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: NetworkRacksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: NetworkRacksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkRacksCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkRacksCreateResponse = NetworkRack; + +// @public +export interface NetworkRacksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkRacksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkRacksGetResponse = NetworkRack; + +// @public +export interface NetworkRackSku extends ProxyResource { + maximumServerCount?: number; + maximumStorageCount?: number; + maximumUplinks?: number; + networkDevices?: NetworkDeviceRoleProperties[]; + readonly provisioningState?: ProvisioningState; + roleName: NetworkRackRoleName; +} + +// @public +export interface NetworkRackSkus { + get(networkRackSkuName: string, options?: NetworkRackSkusGetOptionalParams): Promise; + listBySubscription(options?: NetworkRackSkusListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkRackSkusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkRackSkusGetResponse = NetworkRackSku; + +// @public +export interface NetworkRackSkusListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkRackSkusListBySubscriptionNextResponse = NetworkRackSkusListResult; + +// @public +export interface NetworkRackSkusListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkRackSkusListBySubscriptionResponse = NetworkRackSkusListResult; + +// @public +export interface NetworkRackSkusListResult { + nextLink?: string; + value?: NetworkRackSku[]; +} + +// @public +export interface NetworkRacksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkRacksListByResourceGroupNextResponse = NetworkRacksListResult; + +// @public +export interface NetworkRacksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkRacksListByResourceGroupResponse = NetworkRacksListResult; + +// @public +export interface NetworkRacksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkRacksListBySubscriptionNextResponse = NetworkRacksListResult; + +// @public +export interface NetworkRacksListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkRacksListBySubscriptionResponse = NetworkRacksListResult; + +// @public +export interface NetworkRacksListResult { + nextLink?: string; + value?: NetworkRack[]; +} + +// @public +export interface NetworkRacksUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface NetworkRacksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkRacksUpdateResponse = NetworkRack; + +// @public +export interface NetworkToNetworkInterconnect extends ProxyResource { + readonly administrativeState?: EnabledDisabledState; + isManagementType?: BooleanEnumProperty; + layer2Configuration?: Layer2Configuration; + layer3Configuration?: Layer3Configuration; + nniType?: NniType; + readonly provisioningState?: ProvisioningState; + useOptionB?: BooleanEnumProperty; +} + +// @public +export interface NetworkToNetworkInterconnects { + beginCreate(resourceGroupName: string, networkFabricName: string, networkToNetworkInterconnectName: string, body: NetworkToNetworkInterconnect, options?: NetworkToNetworkInterconnectsCreateOptionalParams): Promise, NetworkToNetworkInterconnectsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, networkFabricName: string, networkToNetworkInterconnectName: string, body: NetworkToNetworkInterconnect, options?: NetworkToNetworkInterconnectsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, networkFabricName: string, networkToNetworkInterconnectName: string, options?: NetworkToNetworkInterconnectsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, networkFabricName: string, networkToNetworkInterconnectName: string, options?: NetworkToNetworkInterconnectsDeleteOptionalParams): Promise; + get(resourceGroupName: string, networkFabricName: string, networkToNetworkInterconnectName: string, options?: NetworkToNetworkInterconnectsGetOptionalParams): Promise; + list(resourceGroupName: string, networkFabricName: string, options?: NetworkToNetworkInterconnectsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkToNetworkInterconnectsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkToNetworkInterconnectsCreateResponse = NetworkToNetworkInterconnect; + +// @public +export interface NetworkToNetworkInterconnectsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NetworkToNetworkInterconnectsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkToNetworkInterconnectsGetResponse = NetworkToNetworkInterconnect; + +// @public +export interface NetworkToNetworkInterconnectsList { + nextLink?: string; + value?: NetworkToNetworkInterconnect[]; +} + +// @public +export interface NetworkToNetworkInterconnectsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkToNetworkInterconnectsListNextResponse = NetworkToNetworkInterconnectsList; + +// @public +export interface NetworkToNetworkInterconnectsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkToNetworkInterconnectsListResponse = NetworkToNetworkInterconnectsList; + +// @public +export type NniType = string; + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export type OperationalState = string; + +// @public +export type OperationalStatus = string; + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export interface OptionAProperties extends Layer3IpPrefixProperties { + bfdConfiguration?: FabricBfdConfiguration; + mtu?: number; + peerASN?: number; + vlanId?: number; +} + +// @public +export interface OptionBProperties { + exportRouteTargets?: string[]; + importRouteTargets?: string[]; +} + +// @public +export interface OptionBPropertiesAutoGenerated { + exportRouteTargets: string[]; + importRouteTargets: string[]; +} + +// @public +export type Origin = string; + +// @public +export type PeeringOption = string; + +// @public +export type PowerCycleState = string; + +// @public +export type PowerEnd = string; + +// @public +export type ProvisioningState = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export type ReachabilityState = string; + +// @public +export type RedistributeConnectedSubnets = string; + +// @public +export type RedistributeStaticRoutes = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface RoutePolicies { + beginCreate(resourceGroupName: string, routePolicyName: string, body: RoutePolicy, options?: RoutePoliciesCreateOptionalParams): Promise, RoutePoliciesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, routePolicyName: string, body: RoutePolicy, options?: RoutePoliciesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, routePolicyName: string, options?: RoutePoliciesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, routePolicyName: string, options?: RoutePoliciesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, routePolicyName: string, body: RoutePolicyPatch, options?: RoutePoliciesUpdateOptionalParams): Promise, RoutePoliciesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, routePolicyName: string, body: RoutePolicyPatch, options?: RoutePoliciesUpdateOptionalParams): Promise; + get(resourceGroupName: string, routePolicyName: string, options?: RoutePoliciesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: RoutePoliciesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: RoutePoliciesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RoutePoliciesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RoutePoliciesCreateResponse = RoutePolicy; + +// @public +export interface RoutePoliciesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RoutePoliciesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RoutePoliciesGetResponse = RoutePolicy; + +// @public +export interface RoutePoliciesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RoutePoliciesListByResourceGroupNextResponse = RoutePoliciesListResult; + +// @public +export interface RoutePoliciesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RoutePoliciesListByResourceGroupResponse = RoutePoliciesListResult; + +// @public +export interface RoutePoliciesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RoutePoliciesListBySubscriptionNextResponse = RoutePoliciesListResult; + +// @public +export interface RoutePoliciesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RoutePoliciesListBySubscriptionResponse = RoutePoliciesListResult; + +// @public +export interface RoutePoliciesListResult { + nextLink?: string; + value?: RoutePolicy[]; +} + +// @public +export interface RoutePoliciesUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface RoutePoliciesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RoutePoliciesUpdateResponse = RoutePolicy; + +// @public +export interface RoutePolicy extends TrackedResource { + annotation?: string; + readonly provisioningState?: ProvisioningState; + statements: RoutePolicyStatementProperties[]; +} + +// @public +export interface RoutePolicyPatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface RoutePolicyProperties extends AnnotationResource { + readonly provisioningState?: ProvisioningState; + statements: RoutePolicyStatementProperties[]; +} + +// @public +export interface RoutePolicyStatementProperties extends AnnotationResource { + action: StatementActionProperties; + condition: StatementConditionProperties; + sequenceNumber: number; +} + +// @public +export type State = string; + +// @public +export interface StatementActionProperties { + actionType: CommunityActionTypes; + ipCommunityProperties?: ActionIpCommunityProperties; + ipExtendedCommunityProperties?: ActionIpExtendedCommunityProperties; + localPreference?: number; +} + +// @public +export interface StatementConditionProperties extends IpCommunityIdList, IpExtendedCommunityIdList { + ipPrefixId?: string; +} + +// @public +export interface StaticRouteConfiguration { + bfdConfiguration?: BfdConfiguration; + ipv4Routes?: StaticRouteProperties[]; + ipv6Routes?: StaticRouteProperties[]; +} + +// @public +export interface StaticRouteProperties { + nextHop: string[]; + prefix: string; +} + +// @public +export interface SupportedConnectorProperties { + connectorType?: string; + maxSpeedInMbps?: number; +} + +// @public +export interface SupportedVersionProperties { + isCurrent?: IsCurrentVersion; + isTest?: IsTestVersion; + vendorFirmwareVersion?: string; + vendorOsVersion?: string; + version?: string; +} + +// @public +export interface SupportPackageProperties { + supportPackageURL: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TerminalServerConfiguration extends Layer3IpPrefixProperties, TerminalServerPatchableProperties { + readonly networkDeviceId?: string; +} + +// @public +export type TerminalServerConnectivityState = string; + +// @public +export interface TerminalServerPatchableProperties { + password?: string; + serialNumber?: string; + username?: string; +} + +// @public +export interface TerminalServerPatchParameters { + terminalServerConfiguration?: TerminalServerPatchableProperties; +} + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface UpdateAdministrativeState extends EnableDisableOnResources { + state?: AdministrativeState; +} + +// @public +export interface UpdatePowerCycleProperties { + powerEnd: PowerEnd; + state: State; +} + +// @public +export interface UpdateVersionProperties { + skuVersion: string; +} + +// @public +export interface VpnConfigurationProperties { + readonly administrativeState?: EnabledDisabledState; + readonly networkToNetworkInterconnectId?: string; + optionAProperties?: OptionAProperties; + optionBProperties?: OptionBPropertiesAutoGenerated; + peeringOption: PeeringOption; +} + +// @public +export type WellKnownCommunities = string; + +// @public +export interface WorkloadServices { + ipv4AddressSpaces?: string[]; + ipv6AddressSpaces?: string[]; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/rollup.config.js b/sdk/managednetworkfabric/arm-managednetworkfabric/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/rollup.config.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +// #region Warning Handler + +/** + * 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 ignoreNiseSinonEval(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependency(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs(), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/sample.env b/sdk/managednetworkfabric/arm-managednetworkfabric/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsCreateSample.ts new file mode 100644 index 000000000000..65a9b6d4b2d8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsCreateSample.ts @@ -0,0 +1,64 @@ +/* + * 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 { + AccessControlList, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Access Control List PUT method. + * + * @summary Implements Access Control List PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Create_MinimumSet_Gen.json + */ +async function accessControlListsCreateMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const body: AccessControlList = { + addressFamily: "ipv4", + conditions: [ + { + action: "allow", + destinationAddress: "1.1.1.1", + destinationPort: "21", + sequenceNumber: 3, + sourceAddress: "2.2.2.2", + sourcePort: "65000", + protocol: 6 + } + ], + location: "EastUs" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.accessControlLists.create( + resourceGroupName, + accessControlListName, + body + ); + console.log(result); +} + +async function main() { + accessControlListsCreateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsDeleteSample.ts new file mode 100644 index 000000000000..646181ff42a8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Access Control List DELETE method. + * + * @summary Implements Access Control List DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Delete_MinimumSet_Gen.json + */ +async function accessControlListsDeleteMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "subscriptionId"; + const accessControlListName = "aclOne"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.accessControlLists.delete( + resourceGroupName, + accessControlListName + ); + console.log(result); +} + +async function main() { + accessControlListsDeleteMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsGetSample.ts new file mode 100644 index 000000000000..7c57ae1520a6 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Access Control List GET method. + * + * @summary Implements Access Control List GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json + */ +async function accessControlListsGetMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.accessControlLists.get( + resourceGroupName, + accessControlListName + ); + console.log(result); +} + +async function main() { + accessControlListsGetMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsListByResourceGroupSample.ts new file mode 100644 index 000000000000..b1413535da8b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements AccessControlLists list by resource group GET method. + * + * @summary Implements AccessControlLists list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListByResourceGroup_MinimumSet_Gen.json + */ +async function accessControlListsListByResourceGroupMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.accessControlLists.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + accessControlListsListByResourceGroupMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsListBySubscriptionSample.ts new file mode 100644 index 000000000000..641a376df61e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements AccessControlLists list by subscription GET method. + * + * @summary Implements AccessControlLists list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListBySubscription_MinimumSet_Gen.json + */ +async function accessControlListsListBySubscriptionMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.accessControlLists.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + accessControlListsListBySubscriptionMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsUpdateSample.ts new file mode 100644 index 000000000000..a617cccb7564 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/accessControlListsUpdateSample.ts @@ -0,0 +1,63 @@ +/* + * 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 { + AccessControlListPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the Access Control List resource. + * + * @summary API to update certain properties of the Access Control List resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Update_MinimumSet_Gen.json + */ +async function accessControlListsUpdateMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const body: AccessControlListPatch = { + addressFamily: "ipv4", + conditions: [ + { + action: "allow", + destinationAddress: "1.1.1.2", + destinationPort: "21", + sequenceNumber: 4, + sourceAddress: "2.2.2.3", + sourcePort: "65000", + protocol: 6 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.accessControlLists.update( + resourceGroupName, + accessControlListName, + body + ); + console.log(result); +} + +async function main() { + accessControlListsUpdateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksClearArpEntriesSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksClearArpEntriesSample.ts new file mode 100644 index 000000000000..4df6a52ce248 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksClearArpEntriesSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to clearArpEntries for externalNetwork. + * + * @summary clearArpEntries for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearArpEntries_MaximumSet_Gen.json + */ +async function externalNetworksClearArpEntriesMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginClearArpEntriesAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksClearArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksClearIpv6NeighborsSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksClearIpv6NeighborsSample.ts new file mode 100644 index 000000000000..1fbfa382fbbe --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksClearIpv6NeighborsSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to clearIpv6Neighbors for externalNetwork. + * + * @summary clearIpv6Neighbors for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json + */ +async function externalNetworksClearIpv6NeighborsMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginClearIpv6NeighborsAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksClearIpv6NeighborsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksCreateSample.ts new file mode 100644 index 000000000000..9439f95097c2 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksCreateSample.ts @@ -0,0 +1,72 @@ +/* + * 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 { + ExternalNetwork, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates ExternalNetwork PUT method. + * + * @summary Creates ExternalNetwork PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Create_MaximumSet_Gen.json + */ +async function externalNetworksCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: ExternalNetwork = { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + optionAProperties: { + bfdConfiguration: {}, + mtu: 1500, + peerASN: 65047, + primaryIpv4Prefix: "10.1.1.0/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "10.1.1.4/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 1001 + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"] + }, + peeringOption: "OptionA" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksDeleteSample.ts new file mode 100644 index 000000000000..176fd24c77f9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements ExternalNetworks DELETE method. + * + * @summary Implements ExternalNetworks DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Delete_MaximumSet_Gen.json + */ +async function externalNetworksDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName + ); + console.log(result); +} + +async function main() { + externalNetworksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksGetSample.ts new file mode 100644 index 000000000000..baf2ed492117 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements ExternalNetworks GET method. + * + * @summary Implements ExternalNetworks GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json + */ +async function externalNetworksGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.get( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName + ); + console.log(result); +} + +async function main() { + externalNetworksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksListSample.ts new file mode 100644 index 000000000000..2d2bee2813d2 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksListSample.ts @@ -0,0 +1,48 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements External Networks list by resource group GET method. + * + * @summary Implements External Networks list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_List_MaximumSet_Gen.json + */ +async function externalNetworksListMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.externalNetworks.list( + resourceGroupName, + l3IsolationDomainName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + externalNetworksListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..eaca6d1da125 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Executes update operation to enable or disable administrative State for externalNetwork. + * + * @summary Executes update operation to enable or disable administrative State for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateBfdForBgpAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateBfdForBgpAdministrativeStateSample.ts new file mode 100644 index 000000000000..dc7332221b70 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateBfdForBgpAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BfdForBgp for externalNetwork. + * + * @summary Update BfdForBgp for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateBgpAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateBgpAdministrativeStateSample.ts new file mode 100644 index 000000000000..2ec2c5b55744 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateBgpAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BGP for externalNetwork. + * + * @summary Update BGP for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateSample.ts new file mode 100644 index 000000000000..2d92f020311d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/externalNetworksUpdateSample.ts @@ -0,0 +1,73 @@ +/* + * 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 { + ExternalNetworkPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the ExternalNetworks resource. + * + * @summary API to update certain properties of the ExternalNetworks resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Update_MaximumSet_Gen.json + */ +async function externalNetworksUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: ExternalNetworkPatch = { + annotation: "Lab 1", + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + optionAProperties: { + bfdConfiguration: {}, + mtu: 1500, + peerASN: 65047, + primaryIpv4Prefix: "10.1.1.0/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "10.1.1.4/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 1001 + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"] + }, + peeringOption: "OptionA" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksClearArpEntriesSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksClearArpEntriesSample.ts new file mode 100644 index 000000000000..9929f0865bd3 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksClearArpEntriesSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to clearArpEntries for internalNetwork. + * + * @summary clearArpEntries for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearArpEntries_MaximumSet_Gen.json + */ +async function internalNetworksClearArpEntriesMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginClearArpEntriesAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksClearArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksClearIpv6NeighborsSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksClearIpv6NeighborsSample.ts new file mode 100644 index 000000000000..9f83c8e0338d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksClearIpv6NeighborsSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to clearIpv6Neighbors for internalNetwork. + * + * @summary clearIpv6Neighbors for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json + */ +async function internalNetworksClearIpv6NeighborsMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginClearIpv6NeighborsAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksClearIpv6NeighborsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksCreateSample.ts new file mode 100644 index 000000000000..76b1389ff603 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksCreateSample.ts @@ -0,0 +1,77 @@ +/* + * 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 { + InternalNetwork, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates InternalNetwork PUT method. + * + * @summary Creates InternalNetwork PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Create_MaximumSet_Gen.json + */ +async function internalNetworksCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: InternalNetwork = { + bgpConfiguration: { + allowAS: 1, + allowASOverride: "Enable", + bfdConfiguration: {}, + defaultRouteOriginate: "True", + ipv4ListenRangePrefixes: ["10.1.0.0/25"], + ipv4NeighborAddress: [{ address: "10.1.0.0" }], + ipv6ListenRangePrefixes: ["2fff::/66"], + ipv6NeighborAddress: [{ address: "2fff::" }], + peerASN: 6 + }, + connectedIPv4Subnets: [{ prefix: "10.0.0.0/24" }], + connectedIPv6Subnets: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }], + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + mtu: 1500, + staticRouteConfiguration: { + bfdConfiguration: {}, + ipv4Routes: [{ nextHop: ["10.0.0.1"], prefix: "10.1.0.0/24" }], + ipv6Routes: [{ nextHop: ["2ffe::1"], prefix: "2fff::/64" }] + }, + vlanId: 501 + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksDeleteSample.ts new file mode 100644 index 000000000000..d4dbfb1b2438 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements InternalNetworks DELETE method. + * + * @summary Implements InternalNetworks DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Delete_MaximumSet_Gen.json + */ +async function internalNetworksDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName + ); + console.log(result); +} + +async function main() { + internalNetworksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksGetSample.ts new file mode 100644 index 000000000000..88ade242d130 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a InternalNetworks. + * + * @summary Gets a InternalNetworks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json + */ +async function internalNetworksGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.get( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName + ); + console.log(result); +} + +async function main() { + internalNetworksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksListSample.ts new file mode 100644 index 000000000000..5519245a5e5d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksListSample.ts @@ -0,0 +1,48 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays InternalNetworks list by resource group GET method. + * + * @summary Displays InternalNetworks list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_List_MaximumSet_Gen.json + */ +async function internalNetworksListMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.internalNetworks.list( + resourceGroupName, + l3IsolationDomainName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + internalNetworksListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..28e3711a9ddc --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update Administrative state of InternalNetworks on resources referred by their resource ids. + * + * @summary Update Administrative state of InternalNetworks on resources referred by their resource ids. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBfdForBgpAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBfdForBgpAdministrativeStateSample.ts new file mode 100644 index 000000000000..c47a803d8f6d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBfdForBgpAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BfdForBgp for internalNetwork. + * + * @summary Update BfdForBgp for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.ts new file mode 100644 index 000000000000..c06d00870fdb --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BfdForStaticRoutes for internalNetwork. + * + * @summary Update BfdForStaticRoutes for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateBfdForStaticRouteAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBgpAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBgpAdministrativeStateSample.ts new file mode 100644 index 000000000000..5b9078792d83 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateBgpAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BGP state for internalNetwork. Allowed only on edge devices. + * + * @summary Update BGP state for internalNetwork. Allowed only on edge devices. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateSample.ts new file mode 100644 index 000000000000..ece280392ade --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/internalNetworksUpdateSample.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + InternalNetworkPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates a InternalNetworks. + * + * @summary Updates a InternalNetworks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Update_MaximumSet_Gen.json + */ +async function internalNetworksUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: InternalNetworkPatch = { + bgpConfiguration: { + allowAS: 1, + allowASOverride: "Enable", + bfdConfiguration: {}, + defaultRouteOriginate: "True", + ipv4ListenRangePrefixes: ["10.1.0.0/25"], + ipv4NeighborAddress: [{ address: "10.1.0.0" }], + ipv6ListenRangePrefixes: ["2fff::/66"], + ipv6NeighborAddress: [{ address: "2fff::" }], + peerASN: 6 + }, + connectedIPv4Subnets: [{ prefix: "10.0.0.0/24" }], + connectedIPv6Subnets: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }], + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + mtu: 1500, + staticRouteConfiguration: { + bfdConfiguration: {}, + ipv4Routes: [{ nextHop: ["10.0.0.1"], prefix: "10.1.0.0/24" }], + ipv6Routes: [{ nextHop: ["2ffe::1"], prefix: "2fff::/64" }] + } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesCreateSample.ts new file mode 100644 index 000000000000..64029c2c1b94 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesCreateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + IpCommunity, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements an IP Community PUT method. + * + * @summary Implements an IP Community PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Create_MaximumSet_Gen.json + */ +async function ipCommunitiesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpCommunityLists"; + const ipCommunityName = "example-ipCommunity"; + const body: IpCommunity = { + action: "Permit", + annotation: "annotationValue", + communityMembers: ["1234:5678"], + location: "EastUS", + tags: { key2814: "" }, + wellKnownCommunities: ["Internet", "LocalAS", "NoExport", "GShut"] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipCommunities.beginCreateAndWait( + resourceGroupName, + ipCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipCommunitiesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesDeleteSample.ts new file mode 100644 index 000000000000..bf59c2c9e195 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Community DELETE method. + * + * @summary Implements IP Community DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Delete_MaximumSet_Gen.json + */ +async function ipCommunitiesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "IpCommunityList1"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipCommunities.beginDeleteAndWait( + resourceGroupName, + ipCommunityName + ); + console.log(result); +} + +async function main() { + ipCommunitiesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesGetSample.ts new file mode 100644 index 000000000000..945ba2072845 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements an IP Community GET method. + * + * @summary Implements an IP Community GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json + */ +async function ipCommunitiesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "example-ipCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipCommunities.get( + resourceGroupName, + ipCommunityName + ); + console.log(result); +} + +async function main() { + ipCommunitiesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesListByResourceGroupSample.ts new file mode 100644 index 000000000000..5c0ede5a35f4 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpCommunities list by resource group GET method. + * + * @summary Implements IpCommunities list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipCommunitiesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipCommunities.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipCommunitiesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesListBySubscriptionSample.ts new file mode 100644 index 000000000000..464725791299 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpCommunities list by subscription GET method. + * + * @summary Implements IpCommunities list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json + */ +async function ipCommunitiesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipCommunities.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipCommunitiesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesUpdateSample.ts new file mode 100644 index 000000000000..0b12b6633030 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipCommunitiesUpdateSample.ts @@ -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 { + IpCommunityPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Community resource. + * + * @summary API to update certain properties of the IP Community resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Update_MaximumSet_Gen.json + */ +async function ipCommunitiesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "example-ipCommunity"; + const body: IpCommunityPatch = { tags: { key2814: "" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipCommunities.beginUpdateAndWait( + resourceGroupName, + ipCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipCommunitiesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesCreateSample.ts new file mode 100644 index 000000000000..ba64f36256ca --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesCreateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + IpExtendedCommunity, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Extended Community PUT method. + * + * @summary Implements IP Extended Community PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const body: IpExtendedCommunity = { + action: "Permit", + annotation: "annotationValue", + location: "EastUs", + routeTargets: ["1234:5678"], + tags: { key5054: "key" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipExtendedCommunities.beginCreateAndWait( + resourceGroupName, + ipExtendedCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesDeleteSample.ts new file mode 100644 index 000000000000..43e8777f55f7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Extended Community DELETE method. + * + * @summary Implements IP Extended Community DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipExtendedCommunities.beginDeleteAndWait( + resourceGroupName, + ipExtendedCommunityName + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesGetSample.ts new file mode 100644 index 000000000000..c269912fe944 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesGetSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Extended Community GET method. + * + * @summary Implements IP Extended Community GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipExtendedCommunities.get( + resourceGroupName, + ipExtendedCommunityName + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesListByResourceGroupSample.ts new file mode 100644 index 000000000000..8eb8171f862a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesListByResourceGroupSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpExtendedCommunities list by resource group GET method. + * + * @summary Implements IpExtendedCommunities list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipExtendedCommunities.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipExtendedCommunitiesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesListBySubscriptionSample.ts new file mode 100644 index 000000000000..24f117f8be7a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpExtendedCommunities list by subscription GET method. + * + * @summary Implements IpExtendedCommunities list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipExtendedCommunities.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipExtendedCommunitiesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesUpdateSample.ts new file mode 100644 index 000000000000..b58461159e42 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipExtendedCommunitiesUpdateSample.ts @@ -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 { + IpExtendedCommunityPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Extended Community resource. + * + * @summary API to update certain properties of the IP Extended Community resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const body: IpExtendedCommunityPatch = { tags: { key5054: "key1" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipExtendedCommunities.beginUpdateAndWait( + resourceGroupName, + ipExtendedCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesCreateSample.ts new file mode 100644 index 000000000000..6c35eb516a57 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesCreateSample.ts @@ -0,0 +1,63 @@ +/* + * 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 { + IpPrefix, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Prefix PUT method. + * + * @summary Implements IP Prefix PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Create_MaximumSet_Gen.json + */ +async function ipPrefixesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const body: IpPrefix = { + annotation: "annotationValue", + ipPrefixRules: [ + { + action: "Permit", + condition: "EqualTo", + networkPrefix: "1.1.1.0/24", + sequenceNumber: 12, + subnetMaskLength: 28 + } + ], + location: "EastUS", + tags: { key6404: "" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipPrefixes.beginCreateAndWait( + resourceGroupName, + ipPrefixName, + body + ); + console.log(result); +} + +async function main() { + ipPrefixesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesDeleteSample.ts new file mode 100644 index 000000000000..b920867bcc34 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Prefix DELETE method. + * + * @summary Implements IP Prefix DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Delete_MaximumSet_Gen.json + */ +async function ipPrefixesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "xxxxxx"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpPrefixLists"; + const ipPrefixName = "example-ipPrefix"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipPrefixes.beginDeleteAndWait( + resourceGroupName, + ipPrefixName + ); + console.log(result); +} + +async function main() { + ipPrefixesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesGetSample.ts new file mode 100644 index 000000000000..647c9b3bb520 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesGetSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Prefix GET method. + * + * @summary Implements IP Prefix GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json + */ +async function ipPrefixesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "xxxxxx"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipPrefixes.get(resourceGroupName, ipPrefixName); + console.log(result); +} + +async function main() { + ipPrefixesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesListByResourceGroupSample.ts new file mode 100644 index 000000000000..92de13c651ff --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpPrefixes list by resource group GET method. + * + * @summary Implements IpPrefixes list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipPrefixesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipPrefixes.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipPrefixesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesListBySubscriptionSample.ts new file mode 100644 index 000000000000..614836496a17 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpPrefixes list by subscription GET method. + * + * @summary Implements IpPrefixes list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json + */ +async function ipPrefixesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipPrefixes.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipPrefixesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesUpdateSample.ts new file mode 100644 index 000000000000..4e34173c6562 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/ipPrefixesUpdateSample.ts @@ -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 { + IpPrefixPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Prefix resource. + * + * @summary API to update certain properties of the IP Prefix resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Update_MaximumSet_Gen.json + */ +async function ipPrefixesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const body: IpPrefixPatch = { tags: { key3127: "key" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipPrefixes.beginUpdateAndWait( + resourceGroupName, + ipPrefixName, + body + ); + console.log(result); +} + +async function main() { + ipPrefixesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsClearArpTableSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsClearArpTableSample.ts new file mode 100644 index 000000000000..7dc3813e82e0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsClearArpTableSample.ts @@ -0,0 +1,54 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears ARP tables for this Isolation Domain. + * + * @summary Clears ARP tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearArpTable_MaximumSet_Gen.json + */ +async function l2IsolationDomainsClearArpTableMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginClearArpTableAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsClearArpTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsClearNeighborTableSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsClearNeighborTableSample.ts new file mode 100644 index 000000000000..1f3ea54ecccd --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsClearNeighborTableSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbors for this Isolation Domain. + * + * @summary Clears IPv6 neighbors for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearNeighborTable_MaximumSet_Gen.json + */ +async function l2IsolationDomainsClearNeighborTableMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "qc"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgL2IsolationDomains"; + const l2IsolationDomainName = "oz"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginClearNeighborTableAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsClearNeighborTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsCreateSample.ts new file mode 100644 index 000000000000..ffa7fe370a1f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsCreateSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + L2IsolationDomain, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. + * + * @summary Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Create_MaximumSet_Gen.json + */ +async function l2IsolationDomainsCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const body: L2IsolationDomain = { + location: "eastus", + mtu: 1500, + networkFabricId: + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName", + vlanId: 501 + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginCreateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsDeleteSample.ts new file mode 100644 index 000000000000..4d5ee372b0f7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * + * @summary Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json + */ +async function l2IsolationDomainsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginDeleteAndWait( + resourceGroupName, + l2IsolationDomainName + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsGetArpEntriesSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsGetArpEntriesSample.ts new file mode 100644 index 000000000000..fecbdb499804 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsGetArpEntriesSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbors for this Isolation Domain. + * + * @summary Clears IPv6 neighbors for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_getArpEntries_MaximumSet_Gen.json + */ +async function l2IsolationDomainsGetArpEntriesMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginGetArpEntriesAndWait( + resourceGroupName, + l2IsolationDomainName + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsGetArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsGetSample.ts new file mode 100644 index 000000000000..6a8a44ad6055 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements L2 Isolation Domain GET method. + * + * @summary Implements L2 Isolation Domain GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json + */ +async function l2IsolationDomainsGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.get( + resourceGroupName, + l2IsolationDomainName + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsListByResourceGroupSample.ts new file mode 100644 index 000000000000..108240b275b1 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays L2IsolationDomains list by resource group GET method. + * + * @summary Displays L2IsolationDomains list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + */ +async function l2IsolationDomainsListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.l2IsolationDomains.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l2IsolationDomainsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsListBySubscriptionSample.ts new file mode 100644 index 000000000000..97e959bfcc47 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays L2IsolationDomains list by subscription GET method. + * + * @summary Displays L2IsolationDomains list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + */ +async function l2IsolationDomainsListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.l2IsolationDomains.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l2IsolationDomainsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..00a246f2c8e6 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsUpdateAdministrativeStateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Enables isolation domain across the fabric or on specified racks. + * + * @summary Enables isolation domain across the fabric or on specified racks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + */ +async function l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsUpdateSample.ts new file mode 100644 index 000000000000..5adc88236519 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l2IsolationDomainsUpdateSample.ts @@ -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 { + L2IsolationDomainPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the L2 Isolation Domain resource. + * + * @summary API to update certain properties of the L2 Isolation Domain resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Update_MaximumSet_Gen.json + */ +async function l2IsolationDomainsUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const body: L2IsolationDomainPatch = { mtu: 9000 }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginUpdateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsClearArpTableSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsClearArpTableSample.ts new file mode 100644 index 000000000000..23f87ed4bd05 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsClearArpTableSample.ts @@ -0,0 +1,54 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears ARP tables for this Isolation Domain. + * + * @summary Clears ARP tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearArpTable_MaximumSet_Gen.json + */ +async function l3IsolationDomainsClearArpTableMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "l3IsolationDomainName"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginClearArpTableAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsClearArpTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsClearNeighborTableSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsClearNeighborTableSample.ts new file mode 100644 index 000000000000..f39c5f712094 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsClearNeighborTableSample.ts @@ -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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbor tables for this Isolation Domain. + * + * @summary Clears IPv6 neighbor tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearNeighborTable_MaximumSet_Gen.json + */ +async function l3IsolationDomainsClearNeighborTableMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: EnableDisableOnResources = { resourceIds: ["wnaxqikneofcni"] }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginClearNeighborTableAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsClearNeighborTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsCreateSample.ts new file mode 100644 index 000000000000..84d68e5803f3 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsCreateSample.ts @@ -0,0 +1,65 @@ +/* + * 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 { + L3IsolationDomain, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. + * + * @summary Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Create_MaximumSet_Gen.json + */ +async function l3IsolationDomainsCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: L3IsolationDomain = { + description: "creating L3 isolation domain", + aggregateRouteConfiguration: { + ipv4Routes: [{ prefix: "10.0.0.0/24" }], + ipv6Routes: [{ prefix: "10.0.0.1" }] + }, + connectedSubnetRoutePolicy: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2" + }, + location: "eastus", + networkFabricId: + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName", + redistributeConnectedSubnets: "True", + redistributeStaticRoutes: "False" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsDeleteSample.ts new file mode 100644 index 000000000000..26f90f79b6a5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * + * @summary Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json + */ +async function l3IsolationDomainsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsGetSample.ts new file mode 100644 index 000000000000..ce8ec391cbf0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Retrieves details of this L3 Isolation Domain. + * + * @summary Retrieves details of this L3 Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + */ +async function l3IsolationDomainsGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.get( + resourceGroupName, + l3IsolationDomainName + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsListByResourceGroupSample.ts new file mode 100644 index 000000000000..1e0bdd0e1e86 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays L3IsolationDomains list by resource group GET method. + * + * @summary Displays L3IsolationDomains list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + */ +async function l3IsolationDomainsListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.l3IsolationDomains.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l3IsolationDomainsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsListBySubscriptionSample.ts new file mode 100644 index 000000000000..7304003d3201 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays L3IsolationDomains list by subscription GET method. + * + * @summary Displays L3IsolationDomains list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + */ +async function l3IsolationDomainsListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.l3IsolationDomains.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l3IsolationDomainsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..6e39b07b73f4 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateAdministrativeStateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Enables racks for this Isolation Domain. + * + * @summary Enables racks for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.ts new file mode 100644 index 000000000000..3801cebe9844 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update administrative state of option B on CE devices + * + * @summary Update administrative state of option B on CE devices + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginUpdateOptionBAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateSample.ts new file mode 100644 index 000000000000..a682ef5a9759 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/l3IsolationDomainsUpdateSample.ts @@ -0,0 +1,62 @@ +/* + * 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 { + L3IsolationDomainPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the L3 Isolation Domain resource. + * + * @summary API to update certain properties of the L3 Isolation Domain resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Update_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: L3IsolationDomainPatch = { + description: "creating L3 isolation domain", + aggregateRouteConfiguration: { + ipv4Routes: [{ prefix: "10.0.0.0/24" }], + ipv6Routes: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }] + }, + connectedSubnetRoutePolicy: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName" + }, + redistributeConnectedSubnets: "True", + redistributeStaticRoutes: "False" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDeviceSkusGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDeviceSkusGetSample.ts new file mode 100644 index 000000000000..25b10b369fa9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDeviceSkusGetSample.ts @@ -0,0 +1,40 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Network Device SKU details. + * + * @summary Get Network Device SKU details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + */ +async function networkDeviceSkusGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkDeviceSkuName = "DefaultSku"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDeviceSkus.get(networkDeviceSkuName); + console.log(result); +} + +async function main() { + networkDeviceSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDeviceSkusListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDeviceSkusListBySubscriptionSample.ts new file mode 100644 index 000000000000..140e43e72de8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDeviceSkusListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List Network Device SKUs for the given subscription. + * + * @summary List Network Device SKUs for the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkDeviceSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkDeviceSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDeviceSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesCreateSample.ts new file mode 100644 index 000000000000..1c1a46483c47 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesCreateSample.ts @@ -0,0 +1,58 @@ +/* + * 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 { + NetworkDevice, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create a Network Device resource + * + * @summary Create a Network Device resource + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Create_MaximumSet_Gen.json + */ +async function networkDevicesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body: NetworkDevice = { + annotation: "null", + hostName: "networkDeviceName", + location: "eastus", + networkDeviceRole: "CE", + networkDeviceSku: "DefaultSku", + serialNumber: "Arista;DCS-7280PR3-24;12.05;JPE21330382", + tags: { keyID: "keyValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginCreateAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesDeleteSample.ts new file mode 100644 index 000000000000..62efb789906b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete the Network Device resource. + * + * @summary Delete the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Delete_MaximumSet_Gen.json + */ +async function networkDevicesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginDeleteAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGenerateSupportPackageSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGenerateSupportPackageSample.ts new file mode 100644 index 000000000000..e76e0dfa7459 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGenerateSupportPackageSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Generate Support Package for the given Network Device. + * + * @summary Generate Support Package for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_generateSupportPackage_MaximumSet_Gen.json + */ +async function networkDevicesGenerateSupportPackageMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginGenerateSupportPackageAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGenerateSupportPackageMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetDynamicInterfaceMapsSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetDynamicInterfaceMapsSample.ts new file mode 100644 index 000000000000..2a76f7c3204c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetDynamicInterfaceMapsSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the dynamic interface maps for the given Network Device. + * + * @summary Get the dynamic interface maps for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen.json + */ +async function networkDevicesGetDynamicInterfaceMapsMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginGetDynamicInterfaceMapsAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetDynamicInterfaceMapsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetSample.ts new file mode 100644 index 000000000000..dc1170afb494 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the Network Device resource details. + * + * @summary Get the Network Device resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json + */ +async function networkDevicesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.get( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetStaticInterfaceMapsSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetStaticInterfaceMapsSample.ts new file mode 100644 index 000000000000..a5582f67c05b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetStaticInterfaceMapsSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the static interface maps for the given Network Device. + * + * @summary Get the static interface maps for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen.json + */ +async function networkDevicesGetStaticInterfaceMapsMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginGetStaticInterfaceMapsAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetStaticInterfaceMapsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetStatusSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetStatusSample.ts new file mode 100644 index 000000000000..2b9586a0f071 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesGetStatusSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the running status of the Network Device. + * + * @summary Get the running status of the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStatus_MaximumSet_Gen.json + */ +async function networkDevicesGetStatusMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginGetStatusAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetStatusMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesListByResourceGroupSample.ts new file mode 100644 index 000000000000..45ba84d455dd --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Device resources in a given resource group. + * + * @summary List all the Network Device resources in a given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkDevicesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkDevices.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDevicesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesListBySubscriptionSample.ts new file mode 100644 index 000000000000..5aee48d0d618 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Device resources in a given subscription. + * + * @summary List all the Network Device resources in a given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json + */ +async function networkDevicesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkDevices.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDevicesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesRebootSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesRebootSample.ts new file mode 100644 index 000000000000..f03d5ed5c44a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesRebootSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Reboot the Network Device. + * + * @summary Reboot the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_reboot_MaximumSet_Gen.json + */ +async function networkDevicesRebootMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginRebootAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesRebootMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesRestoreConfigSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesRestoreConfigSample.ts new file mode 100644 index 000000000000..b65594f0d68f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesRestoreConfigSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Restore the configuration of the Network Device resource to last known good configuration. + * + * @summary Restore the configuration of the Network Device resource to last known good configuration. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_restoreConfig_MaximumSet_Gen.json + */ +async function networkDevicesRestoreConfigMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginRestoreConfigAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesRestoreConfigMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdatePowerCycleSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdatePowerCycleSample.ts new file mode 100644 index 000000000000..c3cb74f71d2f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdatePowerCycleSample.ts @@ -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 { + UpdatePowerCycleProperties, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update PDU power cycle of the Network Device. + * + * @summary Update PDU power cycle of the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updatePowerCycle_MaximumSet_Gen.json + */ +async function networkDevicesUpdatePowerCycleMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body: UpdatePowerCycleProperties = { powerEnd: "Primary", state: "On" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginUpdatePowerCycleAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdatePowerCycleMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdateSample.ts new file mode 100644 index 000000000000..a72ab248d10b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + NetworkDevicePatchParameters, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Device resource. + * + * @summary Update certain properties of the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Update_MaximumSet_Gen.json + */ +async function networkDevicesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body: NetworkDevicePatchParameters = { + annotation: "null", + hostName: "networkDeviceName", + serialNumber: "Arista;DCS-7280PR3-24;12.05;JPE21330382", + tags: { keyID: "keyValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginUpdateAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdateVersionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdateVersionSample.ts new file mode 100644 index 000000000000..06faf9d36499 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkDevicesUpdateVersionSample.ts @@ -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 { + UpdateVersionProperties, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the SKU version of the Network Device resource. + * + * @summary Update the SKU version of the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updateVersion_MaximumSet_Gen.json + */ +async function networkDevicesUpdateVersionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body: UpdateVersionProperties = { skuVersion: "DefaultSku" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginUpdateVersionAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdateVersionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersCreateSample.ts new file mode 100644 index 000000000000..fbd02b7fe637 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersCreateSample.ts @@ -0,0 +1,72 @@ +/* + * 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 { + NetworkFabricController, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates a Network Fabric Controller. + * + * @summary Creates a Network Fabric Controller. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json + */ +async function networkFabricControllersCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "NetworkControllerName"; + const body: NetworkFabricController = { + annotation: "lab 1", + infrastructureExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName" + } + ], + ipv4AddressSpace: "172.253.0.0/19", + location: "eastus", + managedResourceGroupConfiguration: { + name: "managedResourceGroupName", + location: "eastus" + }, + workloadExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName" + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginCreateAndWait( + resourceGroupName, + networkFabricControllerName, + body + ); + console.log(result); +} + +async function main() { + networkFabricControllersCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersDeleteSample.ts new file mode 100644 index 000000000000..cbb7f32f80e8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the Network Fabric Controller resource. + * + * @summary Deletes the Network Fabric Controller resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json + */ +async function networkFabricControllersDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginDeleteAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersDisableWorkloadManagementNetworkSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersDisableWorkloadManagementNetworkSample.ts new file mode 100644 index 000000000000..c6743825f461 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersDisableWorkloadManagementNetworkSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Disables the workloadManagementNetwork (Tenant Network). + * + * @summary Disables the workloadManagementNetwork (Tenant Network). + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen.json + */ +async function networkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginDisableWorkloadManagementNetworkAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersEnableWorkloadManagementNetworkSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersEnableWorkloadManagementNetworkSample.ts new file mode 100644 index 000000000000..f287132da901 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersEnableWorkloadManagementNetworkSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Enables the workloadManagementNetwork (Tenant Network). + * + * @summary Enables the workloadManagementNetwork (Tenant Network). + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen.json + */ +async function networkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginEnableWorkloadManagementNetworkAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersGetSample.ts new file mode 100644 index 000000000000..2aca418a87e8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Shows the provisioning status of Network Fabric Controller. + * + * @summary Shows the provisioning status of Network Fabric Controller. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json + */ +async function networkFabricControllersGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.get( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersListByResourceGroupSample.ts new file mode 100644 index 000000000000..e58bad52e986 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists all the NetworkFabricControllers thats available in the resource group. + * + * @summary Lists all the NetworkFabricControllers thats available in the resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkFabricControllersListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabricControllers.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricControllersListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersListBySubscriptionSample.ts new file mode 100644 index 000000000000..145d5752dd62 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists all the NetworkFabricControllers by subscription. + * + * @summary Lists all the NetworkFabricControllers by subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricControllersListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabricControllers.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricControllersListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersUpdateSample.ts new file mode 100644 index 000000000000..c3c8074bc95a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricControllersUpdateSample.ts @@ -0,0 +1,58 @@ +/* + * 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 { + NetworkFabricControllerPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates are currently not supported for the Network Fabric Controller resource. + * + * @summary Updates are currently not supported for the Network Fabric Controller resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json + */ +async function networkFabricControllersUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const body: NetworkFabricControllerPatch = { + workloadExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName" + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginUpdateAndWait( + resourceGroupName, + networkFabricControllerName, + body + ); + console.log(result); +} + +async function main() { + networkFabricControllersUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricSkusGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricSkusGetSample.ts new file mode 100644 index 000000000000..65fa3f6a3750 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricSkusGetSample.ts @@ -0,0 +1,40 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Network Fabric Sku GET method. + * + * @summary Implements Network Fabric Sku GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json + */ +async function networkFabricSkusGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkFabricSkuName = "networkFabricSkuName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricSkus.get(networkFabricSkuName); + console.log(result); +} + +async function main() { + networkFabricSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricSkusListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricSkusListBySubscriptionSample.ts new file mode 100644 index 000000000000..18459d90185f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricSkusListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements NetworkFabricSkus list by subscription GET method. + * + * @summary Implements NetworkFabricSkus list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabricSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsCreateSample.ts new file mode 100644 index 000000000000..e9b8d01b90ec --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsCreateSample.ts @@ -0,0 +1,105 @@ +/* + * 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 { + NetworkFabric, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create Network Fabric resource. + * + * @summary Create Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Create_MaximumSet_Gen.json + */ +async function networkFabricsCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const body: NetworkFabric = { + annotation: "annotationValue", + fabricASN: 29249, + ipv4Prefix: "10.18.0.0/19", + ipv6Prefix: "3FFE:FFFF:0:CD40::/59", + location: "eastuseuap", + managementNetworkConfiguration: { + infrastructureVpnConfiguration: { + optionAProperties: { + mtu: 5892, + peerASN: 42666, + primaryIpv4Prefix: "20.0.0.12/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a8/126", + secondaryIpv4Prefix: "20.0.0.13/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::ac/126", + vlanId: 2724 + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"] + }, + peeringOption: "OptionA" + }, + workloadVpnConfiguration: { + optionAProperties: { + mtu: 5892, + peerASN: 42666, + primaryIpv4Prefix: "10.0.0.14/30", + primaryIpv6Prefix: "2FFE:FFFF:0:CD30::a7/126", + secondaryIpv4Prefix: "10.0.0.15/30", + secondaryIpv6Prefix: "2FFE:FFFF:0:CD30::ac/126", + vlanId: 2724 + }, + optionBProperties: { + exportRouteTargets: ["65046:10050"], + importRouteTargets: ["65046:10050"] + }, + peeringOption: "OptionA" + } + }, + networkFabricControllerId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + networkFabricSku: "M4-A400-A100-C16-aa", + rackCount: 4, + serverCountPerRack: 8, + tags: { key6468: "" }, + terminalServerConfiguration: { + password: "xxxx", + primaryIpv4Prefix: "20.0.0.12/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a8/126", + secondaryIpv4Prefix: "20.0.0.13/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::ac/126", + serialNumber: "123456", + username: "username" + } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginCreateAndWait( + resourceGroupName, + networkFabricName, + body + ); + console.log(result); +} + +async function main() { + networkFabricsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsDeleteSample.ts new file mode 100644 index 000000000000..4f9e42be2265 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete Network Fabric resource. + * + * @summary Delete Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Delete_MaximumSet_Gen.json + */ +async function networkFabricsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || + "70A68989-24C0-4FA7-B1B2-8A2BB6D10CA8"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgNetworkFabrics"; + const networkFabricName = "lrhjxlxlhgvufessdcuetcwnto"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginDeleteAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsDeprovisionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsDeprovisionSample.ts new file mode 100644 index 000000000000..e42ed87e8c19 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsDeprovisionSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deprovisions the underlying resources in the given Network Fabric instance. + * + * @summary Deprovisions the underlying resources in the given Network Fabric instance. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json + */ +async function networkFabricsDeprovisionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginDeprovisionAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsDeprovisionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsGetSample.ts new file mode 100644 index 000000000000..3031cb751985 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Network Fabric resource details. + * + * @summary Get Network Fabric resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json + */ +async function networkFabricsGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.get( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsListByResourceGroupSample.ts new file mode 100644 index 000000000000..ee5530943414 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Fabric resources in the given resource group. + * + * @summary List all the Network Fabric resources in the given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkFabricsListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgNetworkFabrics"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabrics.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsListBySubscriptionSample.ts new file mode 100644 index 000000000000..18e6f2db11ad --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Fabric resources in the given subscription. + * + * @summary List all the Network Fabric resources in the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricsListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabrics.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsProvisionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsProvisionSample.ts new file mode 100644 index 000000000000..5c900ff0157c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsProvisionSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Provisions the underlying resources in the given Network Fabric instance. + * + * @summary Provisions the underlying resources in the given Network Fabric instance. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_provision_MaximumSet_Gen.json + */ +async function networkFabricsProvisionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginProvisionAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsProvisionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsUpdateSample.ts new file mode 100644 index 000000000000..ebfea338b5a5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkFabricsUpdateSample.ts @@ -0,0 +1,58 @@ +/* + * 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 { + NetworkFabricPatchParameters, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Fabric resource. + * + * @summary Update certain properties of the Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Update_MaximumSet_Gen.json + */ +async function networkFabricsUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const body: NetworkFabricPatchParameters = { + annotation: "annotationValue", + tags: { key1758: "" }, + terminalServerConfiguration: { + password: "xxxxxxx", + serialNumber: "234567", + username: "username" + } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginUpdateAndWait( + resourceGroupName, + networkFabricName, + body + ); + console.log(result); +} + +async function main() { + networkFabricsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesCreateSample.ts new file mode 100644 index 000000000000..c9ce80ab7fda --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesCreateSample.ts @@ -0,0 +1,52 @@ +/* + * 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 { + NetworkInterface, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create a Network Interface resource. + * + * @summary Create a Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Create_MaximumSet_Gen.json + */ +async function networkInterfacesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body: NetworkInterface = { annotation: "null" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginCreateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesDeleteSample.ts new file mode 100644 index 000000000000..9990c342c2b0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete the Network Interface resource. + * + * @summary Delete the Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json + */ +async function networkInterfacesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginDeleteAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesGetSample.ts new file mode 100644 index 000000000000..8f4c3f0f03fb --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the Network Interface resource details. + * + * @summary Get the Network Interface resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json + */ +async function networkInterfacesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.get( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesGetStatusSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesGetStatusSample.ts new file mode 100644 index 000000000000..12852cb1c6dc --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesGetStatusSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the running status of the Network Interface. + * + * @summary Get the running status of the Network Interface. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_getStatus_MaximumSet_Gen.json + */ +async function networkInterfacesGetStatusMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginGetStatusAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesGetStatusMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesListSample.ts new file mode 100644 index 000000000000..68207a212135 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesListSample.ts @@ -0,0 +1,48 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Interface resources in a given resource group. + * + * @summary List all the Network Interface resources in a given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_List_MaximumSet_Gen.json + */ +async function networkInterfacesListMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkInterfaces.list( + resourceGroupName, + networkDeviceName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkInterfacesListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..edaff88d039e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesUpdateAdministrativeStateSample.ts @@ -0,0 +1,52 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the admin state of the Network Interface. + * + * @summary Update the admin state of the Network Interface. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen.json + */ +async function networkInterfacesUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body: UpdateAdministrativeState = { state: "Enable" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesUpdateSample.ts new file mode 100644 index 000000000000..e68668d7cbf5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkInterfacesUpdateSample.ts @@ -0,0 +1,52 @@ +/* + * 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 { + NetworkInterfacePatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Interface resource. + * + * @summary Update certain properties of the Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Update_MaximumSet_Gen.json + */ +async function networkInterfacesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body: NetworkInterfacePatch = { annotation: "null" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginUpdateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRackSkusGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRackSkusGetSample.ts new file mode 100644 index 000000000000..c661aff6cd5b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRackSkusGetSample.ts @@ -0,0 +1,40 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Network Rack SKU resource. + * + * @summary Get Network Rack SKU resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json + */ +async function networkRackSkusGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkRackSkuName = "networkRackSkuName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRackSkus.get(networkRackSkuName); + console.log(result); +} + +async function main() { + networkRackSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRackSkusListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRackSkusListBySubscriptionSample.ts new file mode 100644 index 000000000000..a052058bf31c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRackSkusListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all Network Rack SKUs in the given subscription. + * + * @summary List all Network Rack SKUs in the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkRackSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkRackSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRackSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksCreateSample.ts new file mode 100644 index 000000000000..dbf16ef63503 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksCreateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + NetworkRack, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create Network Rack resource. + * + * @summary Create Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Create_MaximumSet_Gen.json + */ +async function networkRacksCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const body: NetworkRack = { + annotation: "null", + location: "eastus", + networkFabricId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/networkFabricName", + networkRackSku: "RackSKU", + tags: { keyID: "keyValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRacks.beginCreateAndWait( + resourceGroupName, + networkRackName, + body + ); + console.log(result); +} + +async function main() { + networkRacksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksDeleteSample.ts new file mode 100644 index 000000000000..a88d75450d86 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete Network Rack resource. + * + * @summary Delete Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Delete_MaximumSet_Gen.json + */ +async function networkRacksDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRacks.beginDeleteAndWait( + resourceGroupName, + networkRackName + ); + console.log(result); +} + +async function main() { + networkRacksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksGetSample.ts new file mode 100644 index 000000000000..795bfbb9246e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Network Rack resource details. + * + * @summary Get Network Rack resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json + */ +async function networkRacksGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRacks.get( + resourceGroupName, + networkRackName + ); + console.log(result); +} + +async function main() { + networkRacksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksListByResourceGroupSample.ts new file mode 100644 index 000000000000..baa6b16fa171 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all Network Rack resources in the given resource group. + * + * @summary List all Network Rack resources in the given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkRacksListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkRacks.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRacksListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksListBySubscriptionSample.ts new file mode 100644 index 000000000000..998b451e0b86 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all Network Rack resources in the given subscription + * + * @summary List all Network Rack resources in the given subscription + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json + */ +async function networkRacksListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkRacks.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRacksListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksUpdateSample.ts new file mode 100644 index 000000000000..4cfdc3dd4128 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkRacksUpdateSample.ts @@ -0,0 +1,53 @@ +/* + * 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 { + NetworkRackPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Rack resource. + * + * @summary Update certain properties of the Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Update_MaximumSet_Gen.json + */ +async function networkRacksUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const body: NetworkRackPatch = { + properties: {}, + tags: { keyID: "keyValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRacks.beginUpdateAndWait( + resourceGroupName, + networkRackName, + body + ); + console.log(result); +} + +async function main() { + networkRacksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsCreateSample.ts new file mode 100644 index 000000000000..b88d188f253f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsCreateSample.ts @@ -0,0 +1,69 @@ +/* + * 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 { + NetworkToNetworkInterconnect, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Configuration used to setup CE-PE connectivity PUT Method. + * + * @summary Configuration used to setup CE-PE connectivity PUT Method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const body: NetworkToNetworkInterconnect = { + isManagementType: "True", + layer2Configuration: { mtu: 1500, portCount: 10 }, + layer3Configuration: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + peerASN: 50272, + primaryIpv4Prefix: "172.31.0.0/31", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "172.31.0.20/31", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 2064 + }, + nniType: "CE", + useOptionB: "False" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkToNetworkInterconnects.beginCreateAndWait( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName, + body + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsDeleteSample.ts new file mode 100644 index 000000000000..32bb44eb2ec7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements NetworkToNetworkInterconnects DELETE method. + * + * @summary Implements NetworkToNetworkInterconnects DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkToNetworkInterconnects.beginDeleteAndWait( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsGetSample.ts new file mode 100644 index 000000000000..489bcd62245b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements NetworkToNetworkInterconnects GET method. + * + * @summary Implements NetworkToNetworkInterconnects GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkToNetworkInterconnects.get( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsListSample.ts new file mode 100644 index 000000000000..6970ac8dfe69 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/networkToNetworkInterconnectsListSample.ts @@ -0,0 +1,48 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @summary Implements Network To Network Interconnects list by Network Fabric GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_List_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsListMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkToNetworkInterconnects.list( + resourceGroupName, + networkFabricName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkToNetworkInterconnectsListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/operationsListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/operationsListSample.ts new file mode 100644 index 000000000000..f6b3764b97f8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/operationsListSample.ts @@ -0,0 +1,43 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Returns list of all operations. + * + * @summary Returns list of all operations. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ListOperations.json + */ +async function listOperations() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listOperations(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesCreateSample.ts new file mode 100644 index 000000000000..3393ce09aef1 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesCreateSample.ts @@ -0,0 +1,108 @@ +/* + * 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 { + RoutePolicy, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Route Policy PUT method. + * + * @summary Implements Route Policy PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Create_MaximumSet_Gen.json + */ +async function routePoliciesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const body: RoutePolicy = { + annotation: "annotationValue", + location: "EastUS", + statements: [ + { + action: { + actionType: "Permit", + ipCommunityProperties: { + add: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" + ] + }, + delete: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" + ] + }, + set: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" + ] + } + }, + ipExtendedCommunityProperties: { + add: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" + ] + }, + delete: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" + ] + }, + set: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" + ] + } + }, + localPreference: 20 + }, + annotation: "annotationValue", + condition: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" + ], + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" + ], + ipPrefixId: + "subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix" + }, + sequenceNumber: 7 + } + ], + tags: { key8254: "" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.routePolicies.beginCreateAndWait( + resourceGroupName, + routePolicyName, + body + ); + console.log(result); +} + +async function main() { + routePoliciesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesDeleteSample.ts new file mode 100644 index 000000000000..b137e7cafa34 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Route Policy DELETE method. + * + * @summary Implements Route Policy DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Delete_MaximumSet_Gen.json + */ +async function routePoliciesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.routePolicies.beginDeleteAndWait( + resourceGroupName, + routePolicyName + ); + console.log(result); +} + +async function main() { + routePoliciesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesGetSample.ts new file mode 100644 index 000000000000..ddd2ae32a9f1 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Route Policy GET method. + * + * @summary Implements Route Policy GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json + */ +async function routePoliciesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.routePolicies.get( + resourceGroupName, + routePolicyName + ); + console.log(result); +} + +async function main() { + routePoliciesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesListByResourceGroupSample.ts new file mode 100644 index 000000000000..3525f595b349 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements RoutePolicies list by resource group GET method. + * + * @summary Implements RoutePolicies list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + */ +async function routePoliciesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.routePolicies.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + routePoliciesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesListBySubscriptionSample.ts new file mode 100644 index 000000000000..9ad44f193676 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements RoutePolicies list by subscription GET method. + * + * @summary Implements RoutePolicies list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json + */ +async function routePoliciesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.routePolicies.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + routePoliciesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesUpdateSample.ts new file mode 100644 index 000000000000..f6d665be7318 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples-dev/routePoliciesUpdateSample.ts @@ -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 { + RoutePolicyPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the Route Policy resource. + * + * @summary API to update certain properties of the Route Policy resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Update_MaximumSet_Gen.json + */ +async function routePoliciesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || + "97D66995-95BA-464A-A250-FB6E25E499A8"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const routePolicyName = "routePolicyName"; + const body: RoutePolicyPatch = { tags: { key8254: "" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.routePolicies.beginUpdateAndWait( + resourceGroupName, + routePolicyName, + body + ); + console.log(result); +} + +async function main() { + routePoliciesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/README.md b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/README.md new file mode 100644 index 000000000000..17083da813fd --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/README.md @@ -0,0 +1,298 @@ +# client library samples for JavaScript (Beta) + +These sample programs show how to use the JavaScript client libraries for in some common scenarios. + +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [accessControlListsCreateSample.js][accesscontrollistscreatesample] | Implements Access Control List PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Create_MinimumSet_Gen.json | +| [accessControlListsDeleteSample.js][accesscontrollistsdeletesample] | Implements Access Control List DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Delete_MinimumSet_Gen.json | +| [accessControlListsGetSample.js][accesscontrollistsgetsample] | Implements Access Control List GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json | +| [accessControlListsListByResourceGroupSample.js][accesscontrollistslistbyresourcegroupsample] | Implements AccessControlLists list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListByResourceGroup_MinimumSet_Gen.json | +| [accessControlListsListBySubscriptionSample.js][accesscontrollistslistbysubscriptionsample] | Implements AccessControlLists list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListBySubscription_MinimumSet_Gen.json | +| [accessControlListsUpdateSample.js][accesscontrollistsupdatesample] | API to update certain properties of the Access Control List resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Update_MinimumSet_Gen.json | +| [externalNetworksClearArpEntriesSample.js][externalnetworkscleararpentriessample] | clearArpEntries for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearArpEntries_MaximumSet_Gen.json | +| [externalNetworksClearIpv6NeighborsSample.js][externalnetworksclearipv6neighborssample] | clearIpv6Neighbors for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json | +| [externalNetworksCreateSample.js][externalnetworkscreatesample] | Creates ExternalNetwork PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Create_MaximumSet_Gen.json | +| [externalNetworksDeleteSample.js][externalnetworksdeletesample] | Implements ExternalNetworks DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Delete_MaximumSet_Gen.json | +| [externalNetworksGetSample.js][externalnetworksgetsample] | Implements ExternalNetworks GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json | +| [externalNetworksListSample.js][externalnetworkslistsample] | Implements External Networks list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_List_MaximumSet_Gen.json | +| [externalNetworksUpdateAdministrativeStateSample.js][externalnetworksupdateadministrativestatesample] | Executes update operation to enable or disable administrative State for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateAdministrativeState_MaximumSet_Gen.json | +| [externalNetworksUpdateBfdForBgpAdministrativeStateSample.js][externalnetworksupdatebfdforbgpadministrativestatesample] | Update BfdForBgp for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json | +| [externalNetworksUpdateBgpAdministrativeStateSample.js][externalnetworksupdatebgpadministrativestatesample] | Update BGP for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json | +| [externalNetworksUpdateSample.js][externalnetworksupdatesample] | API to update certain properties of the ExternalNetworks resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Update_MaximumSet_Gen.json | +| [internalNetworksClearArpEntriesSample.js][internalnetworkscleararpentriessample] | clearArpEntries for internalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearArpEntries_MaximumSet_Gen.json | +| [internalNetworksClearIpv6NeighborsSample.js][internalnetworksclearipv6neighborssample] | clearIpv6Neighbors for internalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json | +| [internalNetworksCreateSample.js][internalnetworkscreatesample] | Creates InternalNetwork PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Create_MaximumSet_Gen.json | +| [internalNetworksDeleteSample.js][internalnetworksdeletesample] | Implements InternalNetworks DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Delete_MaximumSet_Gen.json | +| [internalNetworksGetSample.js][internalnetworksgetsample] | Gets a InternalNetworks. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json | +| [internalNetworksListSample.js][internalnetworkslistsample] | Displays InternalNetworks list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_List_MaximumSet_Gen.json | +| [internalNetworksUpdateAdministrativeStateSample.js][internalnetworksupdateadministrativestatesample] | Update Administrative state of InternalNetworks on resources referred by their resource ids. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateAdministrativeState_MaximumSet_Gen.json | +| [internalNetworksUpdateBfdForBgpAdministrativeStateSample.js][internalnetworksupdatebfdforbgpadministrativestatesample] | Update BfdForBgp for internalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json | +| [internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.js][internalnetworksupdatebfdforstaticrouteadministrativestatesample] | Update BfdForStaticRoutes for internalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen.json | +| [internalNetworksUpdateBgpAdministrativeStateSample.js][internalnetworksupdatebgpadministrativestatesample] | Update BGP state for internalNetwork. Allowed only on edge devices. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json | +| [internalNetworksUpdateSample.js][internalnetworksupdatesample] | Updates a InternalNetworks. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Update_MaximumSet_Gen.json | +| [ipCommunitiesCreateSample.js][ipcommunitiescreatesample] | Implements an IP Community PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Create_MaximumSet_Gen.json | +| [ipCommunitiesDeleteSample.js][ipcommunitiesdeletesample] | Implements IP Community DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Delete_MaximumSet_Gen.json | +| [ipCommunitiesGetSample.js][ipcommunitiesgetsample] | Implements an IP Community GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json | +| [ipCommunitiesListByResourceGroupSample.js][ipcommunitieslistbyresourcegroupsample] | Implements IpCommunities list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json | +| [ipCommunitiesListBySubscriptionSample.js][ipcommunitieslistbysubscriptionsample] | Implements IpCommunities list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json | +| [ipCommunitiesUpdateSample.js][ipcommunitiesupdatesample] | API to update certain properties of the IP Community resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Update_MaximumSet_Gen.json | +| [ipExtendedCommunitiesCreateSample.js][ipextendedcommunitiescreatesample] | Implements IP Extended Community PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json | +| [ipExtendedCommunitiesDeleteSample.js][ipextendedcommunitiesdeletesample] | Implements IP Extended Community DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json | +| [ipExtendedCommunitiesGetSample.js][ipextendedcommunitiesgetsample] | Implements IP Extended Community GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json | +| [ipExtendedCommunitiesListByResourceGroupSample.js][ipextendedcommunitieslistbyresourcegroupsample] | Implements IpExtendedCommunities list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json | +| [ipExtendedCommunitiesListBySubscriptionSample.js][ipextendedcommunitieslistbysubscriptionsample] | Implements IpExtendedCommunities list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json | +| [ipExtendedCommunitiesUpdateSample.js][ipextendedcommunitiesupdatesample] | API to update certain properties of the IP Extended Community resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json | +| [ipPrefixesCreateSample.js][ipprefixescreatesample] | Implements IP Prefix PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Create_MaximumSet_Gen.json | +| [ipPrefixesDeleteSample.js][ipprefixesdeletesample] | Implements IP Prefix DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Delete_MaximumSet_Gen.json | +| [ipPrefixesGetSample.js][ipprefixesgetsample] | Implements IP Prefix GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json | +| [ipPrefixesListByResourceGroupSample.js][ipprefixeslistbyresourcegroupsample] | Implements IpPrefixes list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json | +| [ipPrefixesListBySubscriptionSample.js][ipprefixeslistbysubscriptionsample] | Implements IpPrefixes list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json | +| [ipPrefixesUpdateSample.js][ipprefixesupdatesample] | API to update certain properties of the IP Prefix resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Update_MaximumSet_Gen.json | +| [l2IsolationDomainsClearArpTableSample.js][l2isolationdomainscleararptablesample] | Clears ARP tables for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearArpTable_MaximumSet_Gen.json | +| [l2IsolationDomainsClearNeighborTableSample.js][l2isolationdomainsclearneighbortablesample] | Clears IPv6 neighbors for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearNeighborTable_MaximumSet_Gen.json | +| [l2IsolationDomainsCreateSample.js][l2isolationdomainscreatesample] | Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Create_MaximumSet_Gen.json | +| [l2IsolationDomainsDeleteSample.js][l2isolationdomainsdeletesample] | Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json | +| [l2IsolationDomainsGetArpEntriesSample.js][l2isolationdomainsgetarpentriessample] | Clears IPv6 neighbors for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_getArpEntries_MaximumSet_Gen.json | +| [l2IsolationDomainsGetSample.js][l2isolationdomainsgetsample] | Implements L2 Isolation Domain GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json | +| [l2IsolationDomainsListByResourceGroupSample.js][l2isolationdomainslistbyresourcegroupsample] | Displays L2IsolationDomains list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json | +| [l2IsolationDomainsListBySubscriptionSample.js][l2isolationdomainslistbysubscriptionsample] | Displays L2IsolationDomains list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json | +| [l2IsolationDomainsUpdateAdministrativeStateSample.js][l2isolationdomainsupdateadministrativestatesample] | Enables isolation domain across the fabric or on specified racks. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json | +| [l2IsolationDomainsUpdateSample.js][l2isolationdomainsupdatesample] | API to update certain properties of the L2 Isolation Domain resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Update_MaximumSet_Gen.json | +| [l3IsolationDomainsClearArpTableSample.js][l3isolationdomainscleararptablesample] | Clears ARP tables for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearArpTable_MaximumSet_Gen.json | +| [l3IsolationDomainsClearNeighborTableSample.js][l3isolationdomainsclearneighbortablesample] | Clears IPv6 neighbor tables for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearNeighborTable_MaximumSet_Gen.json | +| [l3IsolationDomainsCreateSample.js][l3isolationdomainscreatesample] | Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Create_MaximumSet_Gen.json | +| [l3IsolationDomainsDeleteSample.js][l3isolationdomainsdeletesample] | Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json | +| [l3IsolationDomainsGetSample.js][l3isolationdomainsgetsample] | Retrieves details of this L3 Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json | +| [l3IsolationDomainsListByResourceGroupSample.js][l3isolationdomainslistbyresourcegroupsample] | Displays L3IsolationDomains list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json | +| [l3IsolationDomainsListBySubscriptionSample.js][l3isolationdomainslistbysubscriptionsample] | Displays L3IsolationDomains list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json | +| [l3IsolationDomainsUpdateAdministrativeStateSample.js][l3isolationdomainsupdateadministrativestatesample] | Enables racks for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json | +| [l3IsolationDomainsUpdateOptionBAdministrativeStateSample.js][l3isolationdomainsupdateoptionbadministrativestatesample] | Update administrative state of option B on CE devices x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen.json | +| [l3IsolationDomainsUpdateSample.js][l3isolationdomainsupdatesample] | API to update certain properties of the L3 Isolation Domain resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Update_MaximumSet_Gen.json | +| [networkDeviceSkusGetSample.js][networkdeviceskusgetsample] | Get Network Device SKU details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json | +| [networkDeviceSkusListBySubscriptionSample.js][networkdeviceskuslistbysubscriptionsample] | List Network Device SKUs for the given subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json | +| [networkDevicesCreateSample.js][networkdevicescreatesample] | Create a Network Device resource x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Create_MaximumSet_Gen.json | +| [networkDevicesDeleteSample.js][networkdevicesdeletesample] | Delete the Network Device resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Delete_MaximumSet_Gen.json | +| [networkDevicesGenerateSupportPackageSample.js][networkdevicesgeneratesupportpackagesample] | Generate Support Package for the given Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_generateSupportPackage_MaximumSet_Gen.json | +| [networkDevicesGetDynamicInterfaceMapsSample.js][networkdevicesgetdynamicinterfacemapssample] | Get the dynamic interface maps for the given Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen.json | +| [networkDevicesGetSample.js][networkdevicesgetsample] | Get the Network Device resource details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json | +| [networkDevicesGetStaticInterfaceMapsSample.js][networkdevicesgetstaticinterfacemapssample] | Get the static interface maps for the given Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen.json | +| [networkDevicesGetStatusSample.js][networkdevicesgetstatussample] | Get the running status of the Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStatus_MaximumSet_Gen.json | +| [networkDevicesListByResourceGroupSample.js][networkdeviceslistbyresourcegroupsample] | List all the Network Device resources in a given resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json | +| [networkDevicesListBySubscriptionSample.js][networkdeviceslistbysubscriptionsample] | List all the Network Device resources in a given subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json | +| [networkDevicesRebootSample.js][networkdevicesrebootsample] | Reboot the Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_reboot_MaximumSet_Gen.json | +| [networkDevicesRestoreConfigSample.js][networkdevicesrestoreconfigsample] | Restore the configuration of the Network Device resource to last known good configuration. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_restoreConfig_MaximumSet_Gen.json | +| [networkDevicesUpdatePowerCycleSample.js][networkdevicesupdatepowercyclesample] | Update PDU power cycle of the Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updatePowerCycle_MaximumSet_Gen.json | +| [networkDevicesUpdateSample.js][networkdevicesupdatesample] | Update certain properties of the Network Device resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Update_MaximumSet_Gen.json | +| [networkDevicesUpdateVersionSample.js][networkdevicesupdateversionsample] | Update the SKU version of the Network Device resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updateVersion_MaximumSet_Gen.json | +| [networkFabricControllersCreateSample.js][networkfabriccontrollerscreatesample] | Creates a Network Fabric Controller. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json | +| [networkFabricControllersDeleteSample.js][networkfabriccontrollersdeletesample] | Deletes the Network Fabric Controller resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json | +| [networkFabricControllersDisableWorkloadManagementNetworkSample.js][networkfabriccontrollersdisableworkloadmanagementnetworksample] | Disables the workloadManagementNetwork (Tenant Network). x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen.json | +| [networkFabricControllersEnableWorkloadManagementNetworkSample.js][networkfabriccontrollersenableworkloadmanagementnetworksample] | Enables the workloadManagementNetwork (Tenant Network). x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen.json | +| [networkFabricControllersGetSample.js][networkfabriccontrollersgetsample] | Shows the provisioning status of Network Fabric Controller. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json | +| [networkFabricControllersListByResourceGroupSample.js][networkfabriccontrollerslistbyresourcegroupsample] | Lists all the NetworkFabricControllers thats available in the resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json | +| [networkFabricControllersListBySubscriptionSample.js][networkfabriccontrollerslistbysubscriptionsample] | Lists all the NetworkFabricControllers by subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json | +| [networkFabricControllersUpdateSample.js][networkfabriccontrollersupdatesample] | Updates are currently not supported for the Network Fabric Controller resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json | +| [networkFabricSkusGetSample.js][networkfabricskusgetsample] | Implements Network Fabric Sku GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json | +| [networkFabricSkusListBySubscriptionSample.js][networkfabricskuslistbysubscriptionsample] | Implements NetworkFabricSkus list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json | +| [networkFabricsCreateSample.js][networkfabricscreatesample] | Create Network Fabric resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Create_MaximumSet_Gen.json | +| [networkFabricsDeleteSample.js][networkfabricsdeletesample] | Delete Network Fabric resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Delete_MaximumSet_Gen.json | +| [networkFabricsDeprovisionSample.js][networkfabricsdeprovisionsample] | Deprovisions the underlying resources in the given Network Fabric instance. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json | +| [networkFabricsGetSample.js][networkfabricsgetsample] | Get Network Fabric resource details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json | +| [networkFabricsListByResourceGroupSample.js][networkfabricslistbyresourcegroupsample] | List all the Network Fabric resources in the given resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json | +| [networkFabricsListBySubscriptionSample.js][networkfabricslistbysubscriptionsample] | List all the Network Fabric resources in the given subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json | +| [networkFabricsProvisionSample.js][networkfabricsprovisionsample] | Provisions the underlying resources in the given Network Fabric instance. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_provision_MaximumSet_Gen.json | +| [networkFabricsUpdateSample.js][networkfabricsupdatesample] | Update certain properties of the Network Fabric resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Update_MaximumSet_Gen.json | +| [networkInterfacesCreateSample.js][networkinterfacescreatesample] | Create a Network Interface resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Create_MaximumSet_Gen.json | +| [networkInterfacesDeleteSample.js][networkinterfacesdeletesample] | Delete the Network Interface resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json | +| [networkInterfacesGetSample.js][networkinterfacesgetsample] | Get the Network Interface resource details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json | +| [networkInterfacesGetStatusSample.js][networkinterfacesgetstatussample] | Get the running status of the Network Interface. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_getStatus_MaximumSet_Gen.json | +| [networkInterfacesListSample.js][networkinterfaceslistsample] | List all the Network Interface resources in a given resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_List_MaximumSet_Gen.json | +| [networkInterfacesUpdateAdministrativeStateSample.js][networkinterfacesupdateadministrativestatesample] | Update the admin state of the Network Interface. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen.json | +| [networkInterfacesUpdateSample.js][networkinterfacesupdatesample] | Update certain properties of the Network Interface resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Update_MaximumSet_Gen.json | +| [networkRackSkusGetSample.js][networkrackskusgetsample] | Get Network Rack SKU resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json | +| [networkRackSkusListBySubscriptionSample.js][networkrackskuslistbysubscriptionsample] | List all Network Rack SKUs in the given subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_ListBySubscription_MaximumSet_Gen.json | +| [networkRacksCreateSample.js][networkrackscreatesample] | Create Network Rack resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Create_MaximumSet_Gen.json | +| [networkRacksDeleteSample.js][networkracksdeletesample] | Delete Network Rack resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Delete_MaximumSet_Gen.json | +| [networkRacksGetSample.js][networkracksgetsample] | Get Network Rack resource details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json | +| [networkRacksListByResourceGroupSample.js][networkrackslistbyresourcegroupsample] | List all Network Rack resources in the given resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json | +| [networkRacksListBySubscriptionSample.js][networkrackslistbysubscriptionsample] | List all Network Rack resources in the given subscription x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json | +| [networkRacksUpdateSample.js][networkracksupdatesample] | Update certain properties of the Network Rack resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Update_MaximumSet_Gen.json | +| [networkToNetworkInterconnectsCreateSample.js][networktonetworkinterconnectscreatesample] | Configuration used to setup CE-PE connectivity PUT Method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json | +| [networkToNetworkInterconnectsDeleteSample.js][networktonetworkinterconnectsdeletesample] | Implements NetworkToNetworkInterconnects DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json | +| [networkToNetworkInterconnectsGetSample.js][networktonetworkinterconnectsgetsample] | Implements NetworkToNetworkInterconnects GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json | +| [networkToNetworkInterconnectsListSample.js][networktonetworkinterconnectslistsample] | Implements Network To Network Interconnects list by Network Fabric GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_List_MaximumSet_Gen.json | +| [operationsListSample.js][operationslistsample] | Returns list of all operations. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ListOperations.json | +| [routePoliciesCreateSample.js][routepoliciescreatesample] | Implements Route Policy PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Create_MaximumSet_Gen.json | +| [routePoliciesDeleteSample.js][routepoliciesdeletesample] | Implements Route Policy DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Delete_MaximumSet_Gen.json | +| [routePoliciesGetSample.js][routepoliciesgetsample] | Implements Route Policy GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json | +| [routePoliciesListByResourceGroupSample.js][routepolicieslistbyresourcegroupsample] | Implements RoutePolicies list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json | +| [routePoliciesListBySubscriptionSample.js][routepolicieslistbysubscriptionsample] | Implements RoutePolicies list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json | +| [routePoliciesUpdateSample.js][routepoliciesupdatesample] | API to update certain properties of the Route Policy resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Update_MaximumSet_Gen.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node accessControlListsCreateSample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID="" MANAGEDNETWORKFABRIC_RESOURCE_GROUP="" node accessControlListsCreateSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[accesscontrollistscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsCreateSample.js +[accesscontrollistsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsDeleteSample.js +[accesscontrollistsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsGetSample.js +[accesscontrollistslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsListByResourceGroupSample.js +[accesscontrollistslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsListBySubscriptionSample.js +[accesscontrollistsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsUpdateSample.js +[externalnetworkscleararpentriessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksClearArpEntriesSample.js +[externalnetworksclearipv6neighborssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksClearIpv6NeighborsSample.js +[externalnetworkscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksCreateSample.js +[externalnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksDeleteSample.js +[externalnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksGetSample.js +[externalnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksListSample.js +[externalnetworksupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateAdministrativeStateSample.js +[externalnetworksupdatebfdforbgpadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateBfdForBgpAdministrativeStateSample.js +[externalnetworksupdatebgpadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateBgpAdministrativeStateSample.js +[externalnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateSample.js +[internalnetworkscleararpentriessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksClearArpEntriesSample.js +[internalnetworksclearipv6neighborssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksClearIpv6NeighborsSample.js +[internalnetworkscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksCreateSample.js +[internalnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksDeleteSample.js +[internalnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksGetSample.js +[internalnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksListSample.js +[internalnetworksupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateAdministrativeStateSample.js +[internalnetworksupdatebfdforbgpadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBfdForBgpAdministrativeStateSample.js +[internalnetworksupdatebfdforstaticrouteadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.js +[internalnetworksupdatebgpadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBgpAdministrativeStateSample.js +[internalnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateSample.js +[ipcommunitiescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesCreateSample.js +[ipcommunitiesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesDeleteSample.js +[ipcommunitiesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesGetSample.js +[ipcommunitieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesListByResourceGroupSample.js +[ipcommunitieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesListBySubscriptionSample.js +[ipcommunitiesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesUpdateSample.js +[ipextendedcommunitiescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesCreateSample.js +[ipextendedcommunitiesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesDeleteSample.js +[ipextendedcommunitiesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesGetSample.js +[ipextendedcommunitieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesListByResourceGroupSample.js +[ipextendedcommunitieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesListBySubscriptionSample.js +[ipextendedcommunitiesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesUpdateSample.js +[ipprefixescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesCreateSample.js +[ipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesDeleteSample.js +[ipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesGetSample.js +[ipprefixeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesListByResourceGroupSample.js +[ipprefixeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesListBySubscriptionSample.js +[ipprefixesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesUpdateSample.js +[l2isolationdomainscleararptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsClearArpTableSample.js +[l2isolationdomainsclearneighbortablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsClearNeighborTableSample.js +[l2isolationdomainscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsCreateSample.js +[l2isolationdomainsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsDeleteSample.js +[l2isolationdomainsgetarpentriessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsGetArpEntriesSample.js +[l2isolationdomainsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsGetSample.js +[l2isolationdomainslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsListByResourceGroupSample.js +[l2isolationdomainslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsListBySubscriptionSample.js +[l2isolationdomainsupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsUpdateAdministrativeStateSample.js +[l2isolationdomainsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsUpdateSample.js +[l3isolationdomainscleararptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsClearArpTableSample.js +[l3isolationdomainsclearneighbortablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsClearNeighborTableSample.js +[l3isolationdomainscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsCreateSample.js +[l3isolationdomainsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsDeleteSample.js +[l3isolationdomainsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsGetSample.js +[l3isolationdomainslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsListByResourceGroupSample.js +[l3isolationdomainslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsListBySubscriptionSample.js +[l3isolationdomainsupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateAdministrativeStateSample.js +[l3isolationdomainsupdateoptionbadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.js +[l3isolationdomainsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateSample.js +[networkdeviceskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDeviceSkusGetSample.js +[networkdeviceskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDeviceSkusListBySubscriptionSample.js +[networkdevicescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesCreateSample.js +[networkdevicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesDeleteSample.js +[networkdevicesgeneratesupportpackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGenerateSupportPackageSample.js +[networkdevicesgetdynamicinterfacemapssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetDynamicInterfaceMapsSample.js +[networkdevicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetSample.js +[networkdevicesgetstaticinterfacemapssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetStaticInterfaceMapsSample.js +[networkdevicesgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetStatusSample.js +[networkdeviceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesListByResourceGroupSample.js +[networkdeviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesListBySubscriptionSample.js +[networkdevicesrebootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesRebootSample.js +[networkdevicesrestoreconfigsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesRestoreConfigSample.js +[networkdevicesupdatepowercyclesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdatePowerCycleSample.js +[networkdevicesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdateSample.js +[networkdevicesupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdateVersionSample.js +[networkfabriccontrollerscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersCreateSample.js +[networkfabriccontrollersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersDeleteSample.js +[networkfabriccontrollersdisableworkloadmanagementnetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersDisableWorkloadManagementNetworkSample.js +[networkfabriccontrollersenableworkloadmanagementnetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersEnableWorkloadManagementNetworkSample.js +[networkfabriccontrollersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersGetSample.js +[networkfabriccontrollerslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersListByResourceGroupSample.js +[networkfabriccontrollerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersListBySubscriptionSample.js +[networkfabriccontrollersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersUpdateSample.js +[networkfabricskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricSkusGetSample.js +[networkfabricskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricSkusListBySubscriptionSample.js +[networkfabricscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsCreateSample.js +[networkfabricsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsDeleteSample.js +[networkfabricsdeprovisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsDeprovisionSample.js +[networkfabricsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsGetSample.js +[networkfabricslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsListByResourceGroupSample.js +[networkfabricslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsListBySubscriptionSample.js +[networkfabricsprovisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsProvisionSample.js +[networkfabricsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsUpdateSample.js +[networkinterfacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesCreateSample.js +[networkinterfacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesDeleteSample.js +[networkinterfacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesGetSample.js +[networkinterfacesgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesGetStatusSample.js +[networkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesListSample.js +[networkinterfacesupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesUpdateAdministrativeStateSample.js +[networkinterfacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesUpdateSample.js +[networkrackskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRackSkusGetSample.js +[networkrackskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRackSkusListBySubscriptionSample.js +[networkrackscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksCreateSample.js +[networkracksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksDeleteSample.js +[networkracksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksGetSample.js +[networkrackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksListByResourceGroupSample.js +[networkrackslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksListBySubscriptionSample.js +[networkracksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksUpdateSample.js +[networktonetworkinterconnectscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsCreateSample.js +[networktonetworkinterconnectsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsDeleteSample.js +[networktonetworkinterconnectsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsGetSample.js +[networktonetworkinterconnectslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsListSample.js +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/operationsListSample.js +[routepoliciescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesCreateSample.js +[routepoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesDeleteSample.js +[routepoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesGetSample.js +[routepolicieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesListByResourceGroupSample.js +[routepolicieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesListBySubscriptionSample.js +[routepoliciesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesUpdateSample.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-managednetworkfabric?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managednetworkfabric/arm-managednetworkfabric/README.md diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsCreateSample.js new file mode 100644 index 000000000000..b8c8c55c7a09 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsCreateSample.js @@ -0,0 +1,55 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements Access Control List PUT method. + * + * @summary Implements Access Control List PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Create_MinimumSet_Gen.json + */ +async function accessControlListsCreateMinimumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const body = { + addressFamily: "ipv4", + conditions: [ + { + action: "allow", + destinationAddress: "1.1.1.1", + destinationPort: "21", + sequenceNumber: 3, + sourceAddress: "2.2.2.2", + sourcePort: "65000", + protocol: 6, + }, + ], + location: "EastUs", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.accessControlLists.create( + resourceGroupName, + accessControlListName, + body + ); + console.log(result); +} + +async function main() { + accessControlListsCreateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsDeleteSample.js new file mode 100644 index 000000000000..3770a33a63a3 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsDeleteSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements Access Control List DELETE method. + * + * @summary Implements Access Control List DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Delete_MinimumSet_Gen.json + */ +async function accessControlListsDeleteMinimumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "subscriptionId"; + const accessControlListName = "aclOne"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.accessControlLists.delete(resourceGroupName, accessControlListName); + console.log(result); +} + +async function main() { + accessControlListsDeleteMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsGetSample.js new file mode 100644 index 000000000000..845605d54f14 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements Access Control List GET method. + * + * @summary Implements Access Control List GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json + */ +async function accessControlListsGetMinimumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.accessControlLists.get(resourceGroupName, accessControlListName); + console.log(result); +} + +async function main() { + accessControlListsGetMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsListByResourceGroupSample.js new file mode 100644 index 000000000000..fbe527da8b4e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements AccessControlLists list by resource group GET method. + * + * @summary Implements AccessControlLists list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListByResourceGroup_MinimumSet_Gen.json + */ +async function accessControlListsListByResourceGroupMinimumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.accessControlLists.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + accessControlListsListByResourceGroupMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsListBySubscriptionSample.js new file mode 100644 index 000000000000..50a68cb39048 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements AccessControlLists list by subscription GET method. + * + * @summary Implements AccessControlLists list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListBySubscription_MinimumSet_Gen.json + */ +async function accessControlListsListBySubscriptionMinimumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.accessControlLists.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + accessControlListsListBySubscriptionMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsUpdateSample.js new file mode 100644 index 000000000000..a2fbea4cea3e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/accessControlListsUpdateSample.js @@ -0,0 +1,54 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to API to update certain properties of the Access Control List resource. + * + * @summary API to update certain properties of the Access Control List resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Update_MinimumSet_Gen.json + */ +async function accessControlListsUpdateMinimumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const body = { + addressFamily: "ipv4", + conditions: [ + { + action: "allow", + destinationAddress: "1.1.1.2", + destinationPort: "21", + sequenceNumber: 4, + sourceAddress: "2.2.2.3", + sourcePort: "65000", + protocol: 6, + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.accessControlLists.update( + resourceGroupName, + accessControlListName, + body + ); + console.log(result); +} + +async function main() { + accessControlListsUpdateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksClearArpEntriesSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksClearArpEntriesSample.js new file mode 100644 index 000000000000..be7699ebe9ee --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksClearArpEntriesSample.js @@ -0,0 +1,47 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to clearArpEntries for externalNetwork. + * + * @summary clearArpEntries for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearArpEntries_MaximumSet_Gen.json + */ +async function externalNetworksClearArpEntriesMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.beginClearArpEntriesAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksClearArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksClearIpv6NeighborsSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksClearIpv6NeighborsSample.js new file mode 100644 index 000000000000..d0419d9e66e9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksClearIpv6NeighborsSample.js @@ -0,0 +1,47 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to clearIpv6Neighbors for externalNetwork. + * + * @summary clearIpv6Neighbors for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json + */ +async function externalNetworksClearIpv6NeighborsMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.beginClearIpv6NeighborsAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksClearIpv6NeighborsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksCreateSample.js new file mode 100644 index 000000000000..fa5d9e381119 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksCreateSample.js @@ -0,0 +1,63 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates ExternalNetwork PUT method. + * + * @summary Creates ExternalNetwork PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Create_MaximumSet_Gen.json + */ +async function externalNetworksCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body = { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + optionAProperties: { + bfdConfiguration: {}, + mtu: 1500, + peerASN: 65047, + primaryIpv4Prefix: "10.1.1.0/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "10.1.1.4/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 1001, + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"], + }, + peeringOption: "OptionA", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksDeleteSample.js new file mode 100644 index 000000000000..b2a239b0d30e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksDeleteSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements ExternalNetworks DELETE method. + * + * @summary Implements ExternalNetworks DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Delete_MaximumSet_Gen.json + */ +async function externalNetworksDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName + ); + console.log(result); +} + +async function main() { + externalNetworksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksGetSample.js new file mode 100644 index 000000000000..1c0f2fc9f136 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksGetSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements ExternalNetworks GET method. + * + * @summary Implements ExternalNetworks GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json + */ +async function externalNetworksGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.get( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName + ); + console.log(result); +} + +async function main() { + externalNetworksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksListSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksListSample.js new file mode 100644 index 000000000000..60541a7de420 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements External Networks list by resource group GET method. + * + * @summary Implements External Networks list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_List_MaximumSet_Gen.json + */ +async function externalNetworksListMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.externalNetworks.list(resourceGroupName, l3IsolationDomainName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + externalNetworksListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateAdministrativeStateSample.js new file mode 100644 index 000000000000..16de1add307b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateAdministrativeStateSample.js @@ -0,0 +1,48 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Executes update operation to enable or disable administrative State for externalNetwork. + * + * @summary Executes update operation to enable or disable administrative State for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateBfdForBgpAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateBfdForBgpAdministrativeStateSample.js new file mode 100644 index 000000000000..cfbd078cf899 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateBfdForBgpAdministrativeStateSample.js @@ -0,0 +1,48 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update BfdForBgp for externalNetwork. + * + * @summary Update BfdForBgp for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateBgpAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateBgpAdministrativeStateSample.js new file mode 100644 index 000000000000..d33dbc6fd4b6 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateBgpAdministrativeStateSample.js @@ -0,0 +1,48 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update BGP for externalNetwork. + * + * @summary Update BGP for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateSample.js new file mode 100644 index 000000000000..e600bc53c589 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/externalNetworksUpdateSample.js @@ -0,0 +1,64 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to API to update certain properties of the ExternalNetworks resource. + * + * @summary API to update certain properties of the ExternalNetworks resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Update_MaximumSet_Gen.json + */ +async function externalNetworksUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body = { + annotation: "Lab 1", + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + optionAProperties: { + bfdConfiguration: {}, + mtu: 1500, + peerASN: 65047, + primaryIpv4Prefix: "10.1.1.0/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "10.1.1.4/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 1001, + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"], + }, + peeringOption: "OptionA", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.externalNetworks.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksClearArpEntriesSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksClearArpEntriesSample.js new file mode 100644 index 000000000000..a8e1814804a5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksClearArpEntriesSample.js @@ -0,0 +1,47 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to clearArpEntries for internalNetwork. + * + * @summary clearArpEntries for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearArpEntries_MaximumSet_Gen.json + */ +async function internalNetworksClearArpEntriesMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.beginClearArpEntriesAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksClearArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksClearIpv6NeighborsSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksClearIpv6NeighborsSample.js new file mode 100644 index 000000000000..bb11b763d546 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksClearIpv6NeighborsSample.js @@ -0,0 +1,47 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to clearIpv6Neighbors for internalNetwork. + * + * @summary clearIpv6Neighbors for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json + */ +async function internalNetworksClearIpv6NeighborsMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.beginClearIpv6NeighborsAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksClearIpv6NeighborsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksCreateSample.js new file mode 100644 index 000000000000..3b303f317884 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksCreateSample.js @@ -0,0 +1,68 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates InternalNetwork PUT method. + * + * @summary Creates InternalNetwork PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Create_MaximumSet_Gen.json + */ +async function internalNetworksCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body = { + bgpConfiguration: { + allowAS: 1, + allowASOverride: "Enable", + bfdConfiguration: {}, + defaultRouteOriginate: "True", + ipv4ListenRangePrefixes: ["10.1.0.0/25"], + ipv4NeighborAddress: [{ address: "10.1.0.0" }], + ipv6ListenRangePrefixes: ["2fff::/66"], + ipv6NeighborAddress: [{ address: "2fff::" }], + peerASN: 6, + }, + connectedIPv4Subnets: [{ prefix: "10.0.0.0/24" }], + connectedIPv6Subnets: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }], + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + mtu: 1500, + staticRouteConfiguration: { + bfdConfiguration: {}, + ipv4Routes: [{ nextHop: ["10.0.0.1"], prefix: "10.1.0.0/24" }], + ipv6Routes: [{ nextHop: ["2ffe::1"], prefix: "2fff::/64" }], + }, + vlanId: 501, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksDeleteSample.js new file mode 100644 index 000000000000..0a0fa74d010a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksDeleteSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements InternalNetworks DELETE method. + * + * @summary Implements InternalNetworks DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Delete_MaximumSet_Gen.json + */ +async function internalNetworksDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName + ); + console.log(result); +} + +async function main() { + internalNetworksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksGetSample.js new file mode 100644 index 000000000000..b6dd74645a03 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksGetSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets a InternalNetworks. + * + * @summary Gets a InternalNetworks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json + */ +async function internalNetworksGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.get( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName + ); + console.log(result); +} + +async function main() { + internalNetworksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksListSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksListSample.js new file mode 100644 index 000000000000..cc151101ad96 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Displays InternalNetworks list by resource group GET method. + * + * @summary Displays InternalNetworks list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_List_MaximumSet_Gen.json + */ +async function internalNetworksListMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.internalNetworks.list(resourceGroupName, l3IsolationDomainName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + internalNetworksListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateAdministrativeStateSample.js new file mode 100644 index 000000000000..aa9899385ba5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateAdministrativeStateSample.js @@ -0,0 +1,48 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update Administrative state of InternalNetworks on resources referred by their resource ids. + * + * @summary Update Administrative state of InternalNetworks on resources referred by their resource ids. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBfdForBgpAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBfdForBgpAdministrativeStateSample.js new file mode 100644 index 000000000000..3d2078a8a365 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBfdForBgpAdministrativeStateSample.js @@ -0,0 +1,48 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update BfdForBgp for internalNetwork. + * + * @summary Update BfdForBgp for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.js new file mode 100644 index 000000000000..dd7cd40461da --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update BfdForStaticRoutes for internalNetwork. + * + * @summary Update BfdForStaticRoutes for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = + await client.internalNetworks.beginUpdateBfdForStaticRouteAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBgpAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBgpAdministrativeStateSample.js new file mode 100644 index 000000000000..85428e40b8ae --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateBgpAdministrativeStateSample.js @@ -0,0 +1,48 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update BGP state for internalNetwork. Allowed only on edge devices. + * + * @summary Update BGP state for internalNetwork. Allowed only on edge devices. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateSample.js new file mode 100644 index 000000000000..eb146e06d821 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/internalNetworksUpdateSample.js @@ -0,0 +1,67 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Updates a InternalNetworks. + * + * @summary Updates a InternalNetworks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Update_MaximumSet_Gen.json + */ +async function internalNetworksUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body = { + bgpConfiguration: { + allowAS: 1, + allowASOverride: "Enable", + bfdConfiguration: {}, + defaultRouteOriginate: "True", + ipv4ListenRangePrefixes: ["10.1.0.0/25"], + ipv4NeighborAddress: [{ address: "10.1.0.0" }], + ipv6ListenRangePrefixes: ["2fff::/66"], + ipv6NeighborAddress: [{ address: "2fff::" }], + peerASN: 6, + }, + connectedIPv4Subnets: [{ prefix: "10.0.0.0/24" }], + connectedIPv6Subnets: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }], + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + mtu: 1500, + staticRouteConfiguration: { + bfdConfiguration: {}, + ipv4Routes: [{ nextHop: ["10.0.0.1"], prefix: "10.1.0.0/24" }], + ipv6Routes: [{ nextHop: ["2ffe::1"], prefix: "2fff::/64" }], + }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.internalNetworks.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesCreateSample.js new file mode 100644 index 000000000000..db9da18ccca1 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesCreateSample.js @@ -0,0 +1,48 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements an IP Community PUT method. + * + * @summary Implements an IP Community PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Create_MaximumSet_Gen.json + */ +async function ipCommunitiesCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpCommunityLists"; + const ipCommunityName = "example-ipCommunity"; + const body = { + action: "Permit", + annotation: "annotationValue", + communityMembers: ["1234:5678"], + location: "EastUS", + tags: { key2814: "" }, + wellKnownCommunities: ["Internet", "LocalAS", "NoExport", "GShut"], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipCommunities.beginCreateAndWait( + resourceGroupName, + ipCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipCommunitiesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesDeleteSample.js new file mode 100644 index 000000000000..825bfac2127b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesDeleteSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IP Community DELETE method. + * + * @summary Implements IP Community DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Delete_MaximumSet_Gen.json + */ +async function ipCommunitiesDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "IpCommunityList1"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipCommunities.beginDeleteAndWait(resourceGroupName, ipCommunityName); + console.log(result); +} + +async function main() { + ipCommunitiesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesGetSample.js new file mode 100644 index 000000000000..a7d35c842995 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements an IP Community GET method. + * + * @summary Implements an IP Community GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json + */ +async function ipCommunitiesGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "example-ipCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipCommunities.get(resourceGroupName, ipCommunityName); + console.log(result); +} + +async function main() { + ipCommunitiesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesListByResourceGroupSample.js new file mode 100644 index 000000000000..ae9e70cd21a2 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IpCommunities list by resource group GET method. + * + * @summary Implements IpCommunities list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipCommunitiesListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipCommunities.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipCommunitiesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesListBySubscriptionSample.js new file mode 100644 index 000000000000..87461a28f796 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IpCommunities list by subscription GET method. + * + * @summary Implements IpCommunities list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json + */ +async function ipCommunitiesListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipCommunities.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipCommunitiesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesUpdateSample.js new file mode 100644 index 000000000000..6cd52deecd87 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipCommunitiesUpdateSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Community resource. + * + * @summary API to update certain properties of the IP Community resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Update_MaximumSet_Gen.json + */ +async function ipCommunitiesUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "example-ipCommunity"; + const body = { tags: { key2814: "" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipCommunities.beginUpdateAndWait( + resourceGroupName, + ipCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipCommunitiesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesCreateSample.js new file mode 100644 index 000000000000..09db5eecc1ba --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesCreateSample.js @@ -0,0 +1,47 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IP Extended Community PUT method. + * + * @summary Implements IP Extended Community PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const body = { + action: "Permit", + annotation: "annotationValue", + location: "EastUs", + routeTargets: ["1234:5678"], + tags: { key5054: "key" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipExtendedCommunities.beginCreateAndWait( + resourceGroupName, + ipExtendedCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesDeleteSample.js new file mode 100644 index 000000000000..86c694c957a6 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesDeleteSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IP Extended Community DELETE method. + * + * @summary Implements IP Extended Community DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipExtendedCommunities.beginDeleteAndWait( + resourceGroupName, + ipExtendedCommunityName + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesGetSample.js new file mode 100644 index 000000000000..d95dd09c9363 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IP Extended Community GET method. + * + * @summary Implements IP Extended Community GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipExtendedCommunities.get(resourceGroupName, ipExtendedCommunityName); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesListByResourceGroupSample.js new file mode 100644 index 000000000000..97dcd5596846 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IpExtendedCommunities list by resource group GET method. + * + * @summary Implements IpExtendedCommunities list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpExtendedCommunityLists"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipExtendedCommunities.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipExtendedCommunitiesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesListBySubscriptionSample.js new file mode 100644 index 000000000000..97ccaab301f2 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IpExtendedCommunities list by subscription GET method. + * + * @summary Implements IpExtendedCommunities list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipExtendedCommunities.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipExtendedCommunitiesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesUpdateSample.js new file mode 100644 index 000000000000..886b8500ed38 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipExtendedCommunitiesUpdateSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Extended Community resource. + * + * @summary API to update certain properties of the IP Extended Community resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const body = { tags: { key5054: "key1" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipExtendedCommunities.beginUpdateAndWait( + resourceGroupName, + ipExtendedCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesCreateSample.js new file mode 100644 index 000000000000..5fb222b538b9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesCreateSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IP Prefix PUT method. + * + * @summary Implements IP Prefix PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Create_MaximumSet_Gen.json + */ +async function ipPrefixesCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const body = { + annotation: "annotationValue", + ipPrefixRules: [ + { + action: "Permit", + condition: "EqualTo", + networkPrefix: "1.1.1.0/24", + sequenceNumber: 12, + subnetMaskLength: 28, + }, + ], + location: "EastUS", + tags: { key6404: "" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipPrefixes.beginCreateAndWait(resourceGroupName, ipPrefixName, body); + console.log(result); +} + +async function main() { + ipPrefixesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesDeleteSample.js new file mode 100644 index 000000000000..89fa2cecb521 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesDeleteSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IP Prefix DELETE method. + * + * @summary Implements IP Prefix DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Delete_MaximumSet_Gen.json + */ +async function ipPrefixesDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "xxxxxx"; + const resourceGroupName = process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpPrefixLists"; + const ipPrefixName = "example-ipPrefix"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipPrefixes.beginDeleteAndWait(resourceGroupName, ipPrefixName); + console.log(result); +} + +async function main() { + ipPrefixesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesGetSample.js new file mode 100644 index 000000000000..fa2a8cedcd90 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IP Prefix GET method. + * + * @summary Implements IP Prefix GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json + */ +async function ipPrefixesGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "xxxxxx"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipPrefixes.get(resourceGroupName, ipPrefixName); + console.log(result); +} + +async function main() { + ipPrefixesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesListByResourceGroupSample.js new file mode 100644 index 000000000000..0cb4196286ce --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IpPrefixes list by resource group GET method. + * + * @summary Implements IpPrefixes list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipPrefixesListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipPrefixes.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipPrefixesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesListBySubscriptionSample.js new file mode 100644 index 000000000000..dbe36add4fdc --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements IpPrefixes list by subscription GET method. + * + * @summary Implements IpPrefixes list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json + */ +async function ipPrefixesListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.ipPrefixes.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipPrefixesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesUpdateSample.js new file mode 100644 index 000000000000..c1d62749a8a5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/ipPrefixesUpdateSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Prefix resource. + * + * @summary API to update certain properties of the IP Prefix resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Update_MaximumSet_Gen.json + */ +async function ipPrefixesUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const body = { tags: { key3127: "key" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.ipPrefixes.beginUpdateAndWait(resourceGroupName, ipPrefixName, body); + console.log(result); +} + +async function main() { + ipPrefixesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsClearArpTableSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsClearArpTableSample.js new file mode 100644 index 000000000000..ab393d98c5c8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsClearArpTableSample.js @@ -0,0 +1,45 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Clears ARP tables for this Isolation Domain. + * + * @summary Clears ARP tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearArpTable_MaximumSet_Gen.json + */ +async function l2IsolationDomainsClearArpTableMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l2IsolationDomains.beginClearArpTableAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsClearArpTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsClearNeighborTableSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsClearNeighborTableSample.js new file mode 100644 index 000000000000..97ea6368e859 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsClearNeighborTableSample.js @@ -0,0 +1,45 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbors for this Isolation Domain. + * + * @summary Clears IPv6 neighbors for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearNeighborTable_MaximumSet_Gen.json + */ +async function l2IsolationDomainsClearNeighborTableMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "qc"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgL2IsolationDomains"; + const l2IsolationDomainName = "oz"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l2IsolationDomains.beginClearNeighborTableAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsClearNeighborTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsCreateSample.js new file mode 100644 index 000000000000..58592332bd12 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsCreateSample.js @@ -0,0 +1,47 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. + * + * @summary Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Create_MaximumSet_Gen.json + */ +async function l2IsolationDomainsCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const body = { + location: "eastus", + mtu: 1500, + networkFabricId: + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName", + vlanId: 501, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l2IsolationDomains.beginCreateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsDeleteSample.js new file mode 100644 index 000000000000..8ca4b312bab6 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsDeleteSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * + * @summary Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json + */ +async function l2IsolationDomainsDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l2IsolationDomains.beginDeleteAndWait( + resourceGroupName, + l2IsolationDomainName + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsGetArpEntriesSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsGetArpEntriesSample.js new file mode 100644 index 000000000000..4c4004644b78 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsGetArpEntriesSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbors for this Isolation Domain. + * + * @summary Clears IPv6 neighbors for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_getArpEntries_MaximumSet_Gen.json + */ +async function l2IsolationDomainsGetArpEntriesMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l2IsolationDomains.beginGetArpEntriesAndWait( + resourceGroupName, + l2IsolationDomainName + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsGetArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsGetSample.js new file mode 100644 index 000000000000..cbec73849ca5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements L2 Isolation Domain GET method. + * + * @summary Implements L2 Isolation Domain GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json + */ +async function l2IsolationDomainsGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l2IsolationDomains.get(resourceGroupName, l2IsolationDomainName); + console.log(result); +} + +async function main() { + l2IsolationDomainsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsListByResourceGroupSample.js new file mode 100644 index 000000000000..60b801e33b0c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Displays L2IsolationDomains list by resource group GET method. + * + * @summary Displays L2IsolationDomains list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + */ +async function l2IsolationDomainsListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.l2IsolationDomains.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l2IsolationDomainsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsListBySubscriptionSample.js new file mode 100644 index 000000000000..033c13995cac --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Displays L2IsolationDomains list by subscription GET method. + * + * @summary Displays L2IsolationDomains list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + */ +async function l2IsolationDomainsListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.l2IsolationDomains.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l2IsolationDomainsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsUpdateAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsUpdateAdministrativeStateSample.js new file mode 100644 index 000000000000..13ad9137ca24 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsUpdateAdministrativeStateSample.js @@ -0,0 +1,46 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Enables isolation domain across the fabric or on specified racks. + * + * @summary Enables isolation domain across the fabric or on specified racks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + */ +async function l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l2IsolationDomains.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsUpdateSample.js new file mode 100644 index 000000000000..5b083a062f8a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l2IsolationDomainsUpdateSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to API to update certain properties of the L2 Isolation Domain resource. + * + * @summary API to update certain properties of the L2 Isolation Domain resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Update_MaximumSet_Gen.json + */ +async function l2IsolationDomainsUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const body = { mtu: 9000 }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l2IsolationDomains.beginUpdateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsClearArpTableSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsClearArpTableSample.js new file mode 100644 index 000000000000..2eb95d1da0c9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsClearArpTableSample.js @@ -0,0 +1,45 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Clears ARP tables for this Isolation Domain. + * + * @summary Clears ARP tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearArpTable_MaximumSet_Gen.json + */ +async function l3IsolationDomainsClearArpTableMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "l3IsolationDomainName"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l3IsolationDomains.beginClearArpTableAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsClearArpTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsClearNeighborTableSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsClearNeighborTableSample.js new file mode 100644 index 000000000000..1215e241d3a4 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsClearNeighborTableSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbor tables for this Isolation Domain. + * + * @summary Clears IPv6 neighbor tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearNeighborTable_MaximumSet_Gen.json + */ +async function l3IsolationDomainsClearNeighborTableMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body = { resourceIds: ["wnaxqikneofcni"] }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l3IsolationDomains.beginClearNeighborTableAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsClearNeighborTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsCreateSample.js new file mode 100644 index 000000000000..4c14e1e7373c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsCreateSample.js @@ -0,0 +1,56 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. + * + * @summary Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Create_MaximumSet_Gen.json + */ +async function l3IsolationDomainsCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body = { + description: "creating L3 isolation domain", + aggregateRouteConfiguration: { + ipv4Routes: [{ prefix: "10.0.0.0/24" }], + ipv6Routes: [{ prefix: "10.0.0.1" }], + }, + connectedSubnetRoutePolicy: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + }, + location: "eastus", + networkFabricId: + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName", + redistributeConnectedSubnets: "True", + redistributeStaticRoutes: "False", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l3IsolationDomains.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsDeleteSample.js new file mode 100644 index 000000000000..502f55bfb31c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsDeleteSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * + * @summary Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json + */ +async function l3IsolationDomainsDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l3IsolationDomains.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsGetSample.js new file mode 100644 index 000000000000..c3b34188892f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Retrieves details of this L3 Isolation Domain. + * + * @summary Retrieves details of this L3 Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + */ +async function l3IsolationDomainsGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l3IsolationDomains.get(resourceGroupName, l3IsolationDomainName); + console.log(result); +} + +async function main() { + l3IsolationDomainsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsListByResourceGroupSample.js new file mode 100644 index 000000000000..59cf27d764e6 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Displays L3IsolationDomains list by resource group GET method. + * + * @summary Displays L3IsolationDomains list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + */ +async function l3IsolationDomainsListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.l3IsolationDomains.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l3IsolationDomainsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsListBySubscriptionSample.js new file mode 100644 index 000000000000..6388ea176a61 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Displays L3IsolationDomains list by subscription GET method. + * + * @summary Displays L3IsolationDomains list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + */ +async function l3IsolationDomainsListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.l3IsolationDomains.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l3IsolationDomainsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateAdministrativeStateSample.js new file mode 100644 index 000000000000..c2f7547fe0aa --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateAdministrativeStateSample.js @@ -0,0 +1,46 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Enables racks for this Isolation Domain. + * + * @summary Enables racks for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l3IsolationDomains.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.js new file mode 100644 index 000000000000..4e4b7dacc193 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.js @@ -0,0 +1,46 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update administrative state of option B on CE devices + * + * @summary Update administrative state of option B on CE devices + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain", + ], + state: "Enable", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l3IsolationDomains.beginUpdateOptionBAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateSample.js new file mode 100644 index 000000000000..1318e5873349 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/l3IsolationDomainsUpdateSample.js @@ -0,0 +1,53 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to API to update certain properties of the L3 Isolation Domain resource. + * + * @summary API to update certain properties of the L3 Isolation Domain resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Update_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body = { + description: "creating L3 isolation domain", + aggregateRouteConfiguration: { + ipv4Routes: [{ prefix: "10.0.0.0/24" }], + ipv6Routes: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }], + }, + connectedSubnetRoutePolicy: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + }, + redistributeConnectedSubnets: "True", + redistributeStaticRoutes: "False", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.l3IsolationDomains.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDeviceSkusGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDeviceSkusGetSample.js new file mode 100644 index 000000000000..00e19234a330 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDeviceSkusGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get Network Device SKU details. + * + * @summary Get Network Device SKU details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + */ +async function networkDeviceSkusGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkDeviceSkuName = "DefaultSku"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDeviceSkus.get(networkDeviceSkuName); + console.log(result); +} + +async function main() { + networkDeviceSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDeviceSkusListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDeviceSkusListBySubscriptionSample.js new file mode 100644 index 000000000000..682ce2e4a20f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDeviceSkusListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List Network Device SKUs for the given subscription. + * + * @summary List Network Device SKUs for the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkDeviceSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkDeviceSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDeviceSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesCreateSample.js new file mode 100644 index 000000000000..72db9d9f3773 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesCreateSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Create a Network Device resource + * + * @summary Create a Network Device resource + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Create_MaximumSet_Gen.json + */ +async function networkDevicesCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body = { + annotation: "null", + hostName: "networkDeviceName", + location: "eastus", + networkDeviceRole: "CE", + networkDeviceSku: "DefaultSku", + serialNumber: "Arista;DCS-7280PR3-24;12.05;JPE21330382", + tags: { keyID: "keyValue" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginCreateAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesDeleteSample.js new file mode 100644 index 000000000000..f58065230fda --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesDeleteSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Delete the Network Device resource. + * + * @summary Delete the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Delete_MaximumSet_Gen.json + */ +async function networkDevicesDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginDeleteAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGenerateSupportPackageSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGenerateSupportPackageSample.js new file mode 100644 index 000000000000..201a536f146d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGenerateSupportPackageSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Generate Support Package for the given Network Device. + * + * @summary Generate Support Package for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_generateSupportPackage_MaximumSet_Gen.json + */ +async function networkDevicesGenerateSupportPackageMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginGenerateSupportPackageAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGenerateSupportPackageMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetDynamicInterfaceMapsSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetDynamicInterfaceMapsSample.js new file mode 100644 index 000000000000..8a248c343cf5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetDynamicInterfaceMapsSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get the dynamic interface maps for the given Network Device. + * + * @summary Get the dynamic interface maps for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen.json + */ +async function networkDevicesGetDynamicInterfaceMapsMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginGetDynamicInterfaceMapsAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetDynamicInterfaceMapsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetSample.js new file mode 100644 index 000000000000..8ef730f36b28 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get the Network Device resource details. + * + * @summary Get the Network Device resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json + */ +async function networkDevicesGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.get(resourceGroupName, networkDeviceName); + console.log(result); +} + +async function main() { + networkDevicesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetStaticInterfaceMapsSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetStaticInterfaceMapsSample.js new file mode 100644 index 000000000000..5d6ffea07ede --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetStaticInterfaceMapsSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get the static interface maps for the given Network Device. + * + * @summary Get the static interface maps for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen.json + */ +async function networkDevicesGetStaticInterfaceMapsMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginGetStaticInterfaceMapsAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetStaticInterfaceMapsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetStatusSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetStatusSample.js new file mode 100644 index 000000000000..00a84bdc3006 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesGetStatusSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get the running status of the Network Device. + * + * @summary Get the running status of the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStatus_MaximumSet_Gen.json + */ +async function networkDevicesGetStatusMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginGetStatusAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetStatusMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesListByResourceGroupSample.js new file mode 100644 index 000000000000..3c5bbdbc7332 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all the Network Device resources in a given resource group. + * + * @summary List all the Network Device resources in a given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkDevicesListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkDevices.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDevicesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesListBySubscriptionSample.js new file mode 100644 index 000000000000..5f94ff7e7db8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all the Network Device resources in a given subscription. + * + * @summary List all the Network Device resources in a given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json + */ +async function networkDevicesListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkDevices.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDevicesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesRebootSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesRebootSample.js new file mode 100644 index 000000000000..7209b1930341 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesRebootSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Reboot the Network Device. + * + * @summary Reboot the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_reboot_MaximumSet_Gen.json + */ +async function networkDevicesRebootMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginRebootAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesRebootMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesRestoreConfigSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesRestoreConfigSample.js new file mode 100644 index 000000000000..d9f24988e07b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesRestoreConfigSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Restore the configuration of the Network Device resource to last known good configuration. + * + * @summary Restore the configuration of the Network Device resource to last known good configuration. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_restoreConfig_MaximumSet_Gen.json + */ +async function networkDevicesRestoreConfigMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginRestoreConfigAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesRestoreConfigMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdatePowerCycleSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdatePowerCycleSample.js new file mode 100644 index 000000000000..d891b85f6d17 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdatePowerCycleSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update PDU power cycle of the Network Device. + * + * @summary Update PDU power cycle of the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updatePowerCycle_MaximumSet_Gen.json + */ +async function networkDevicesUpdatePowerCycleMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body = { powerEnd: "Primary", state: "On" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginUpdatePowerCycleAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdatePowerCycleMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdateSample.js new file mode 100644 index 000000000000..10889dd8bb08 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdateSample.js @@ -0,0 +1,46 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Device resource. + * + * @summary Update certain properties of the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Update_MaximumSet_Gen.json + */ +async function networkDevicesUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body = { + annotation: "null", + hostName: "networkDeviceName", + serialNumber: "Arista;DCS-7280PR3-24;12.05;JPE21330382", + tags: { keyID: "keyValue" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginUpdateAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdateVersionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdateVersionSample.js new file mode 100644 index 000000000000..49826ef2303a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkDevicesUpdateVersionSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update the SKU version of the Network Device resource. + * + * @summary Update the SKU version of the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updateVersion_MaximumSet_Gen.json + */ +async function networkDevicesUpdateVersionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body = { skuVersion: "DefaultSku" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkDevices.beginUpdateVersionAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdateVersionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersCreateSample.js new file mode 100644 index 000000000000..5af3336b0c50 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersCreateSample.js @@ -0,0 +1,63 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates a Network Fabric Controller. + * + * @summary Creates a Network Fabric Controller. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json + */ +async function networkFabricControllersCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "NetworkControllerName"; + const body = { + annotation: "lab 1", + infrastructureExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName", + }, + ], + ipv4AddressSpace: "172.253.0.0/19", + location: "eastus", + managedResourceGroupConfiguration: { + name: "managedResourceGroupName", + location: "eastus", + }, + workloadExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName", + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabricControllers.beginCreateAndWait( + resourceGroupName, + networkFabricControllerName, + body + ); + console.log(result); +} + +async function main() { + networkFabricControllersCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersDeleteSample.js new file mode 100644 index 000000000000..742bf4cfe7eb --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersDeleteSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deletes the Network Fabric Controller resource. + * + * @summary Deletes the Network Fabric Controller resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json + */ +async function networkFabricControllersDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabricControllers.beginDeleteAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersDisableWorkloadManagementNetworkSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersDisableWorkloadManagementNetworkSample.js new file mode 100644 index 000000000000..56fa612cf1ce --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersDisableWorkloadManagementNetworkSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Disables the workloadManagementNetwork (Tenant Network). + * + * @summary Disables the workloadManagementNetwork (Tenant Network). + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen.json + */ +async function networkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabricControllers.beginDisableWorkloadManagementNetworkAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersEnableWorkloadManagementNetworkSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersEnableWorkloadManagementNetworkSample.js new file mode 100644 index 000000000000..364587007612 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersEnableWorkloadManagementNetworkSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Enables the workloadManagementNetwork (Tenant Network). + * + * @summary Enables the workloadManagementNetwork (Tenant Network). + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen.json + */ +async function networkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabricControllers.beginEnableWorkloadManagementNetworkAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersGetSample.js new file mode 100644 index 000000000000..57cada0cf4f9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersGetSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Shows the provisioning status of Network Fabric Controller. + * + * @summary Shows the provisioning status of Network Fabric Controller. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json + */ +async function networkFabricControllersGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabricControllers.get( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersListByResourceGroupSample.js new file mode 100644 index 000000000000..1af6b221a915 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Lists all the NetworkFabricControllers thats available in the resource group. + * + * @summary Lists all the NetworkFabricControllers thats available in the resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkFabricControllersListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkFabricControllers.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricControllersListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersListBySubscriptionSample.js new file mode 100644 index 000000000000..ce3d9dfb471e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Lists all the NetworkFabricControllers by subscription. + * + * @summary Lists all the NetworkFabricControllers by subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricControllersListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkFabricControllers.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricControllersListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersUpdateSample.js new file mode 100644 index 000000000000..153b94363515 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricControllersUpdateSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Updates are currently not supported for the Network Fabric Controller resource. + * + * @summary Updates are currently not supported for the Network Fabric Controller resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json + */ +async function networkFabricControllersUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const body = { + workloadExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName", + }, + ], + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabricControllers.beginUpdateAndWait( + resourceGroupName, + networkFabricControllerName, + body + ); + console.log(result); +} + +async function main() { + networkFabricControllersUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricSkusGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricSkusGetSample.js new file mode 100644 index 000000000000..7b812449ba4c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricSkusGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements Network Fabric Sku GET method. + * + * @summary Implements Network Fabric Sku GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json + */ +async function networkFabricSkusGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkFabricSkuName = "networkFabricSkuName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabricSkus.get(networkFabricSkuName); + console.log(result); +} + +async function main() { + networkFabricSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricSkusListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricSkusListBySubscriptionSample.js new file mode 100644 index 000000000000..5417d6bb1823 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricSkusListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements NetworkFabricSkus list by subscription GET method. + * + * @summary Implements NetworkFabricSkus list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkFabricSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsCreateSample.js new file mode 100644 index 000000000000..56470ebb0500 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsCreateSample.js @@ -0,0 +1,96 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Create Network Fabric resource. + * + * @summary Create Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Create_MaximumSet_Gen.json + */ +async function networkFabricsCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const body = { + annotation: "annotationValue", + fabricASN: 29249, + ipv4Prefix: "10.18.0.0/19", + ipv6Prefix: "3FFE:FFFF:0:CD40::/59", + location: "eastuseuap", + managementNetworkConfiguration: { + infrastructureVpnConfiguration: { + optionAProperties: { + mtu: 5892, + peerASN: 42666, + primaryIpv4Prefix: "20.0.0.12/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a8/126", + secondaryIpv4Prefix: "20.0.0.13/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::ac/126", + vlanId: 2724, + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"], + }, + peeringOption: "OptionA", + }, + workloadVpnConfiguration: { + optionAProperties: { + mtu: 5892, + peerASN: 42666, + primaryIpv4Prefix: "10.0.0.14/30", + primaryIpv6Prefix: "2FFE:FFFF:0:CD30::a7/126", + secondaryIpv4Prefix: "10.0.0.15/30", + secondaryIpv6Prefix: "2FFE:FFFF:0:CD30::ac/126", + vlanId: 2724, + }, + optionBProperties: { + exportRouteTargets: ["65046:10050"], + importRouteTargets: ["65046:10050"], + }, + peeringOption: "OptionA", + }, + }, + networkFabricControllerId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + networkFabricSku: "M4-A400-A100-C16-aa", + rackCount: 4, + serverCountPerRack: 8, + tags: { key6468: "" }, + terminalServerConfiguration: { + password: "xxxx", + primaryIpv4Prefix: "20.0.0.12/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a8/126", + secondaryIpv4Prefix: "20.0.0.13/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::ac/126", + serialNumber: "123456", + username: "username", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabrics.beginCreateAndWait( + resourceGroupName, + networkFabricName, + body + ); + console.log(result); +} + +async function main() { + networkFabricsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsDeleteSample.js new file mode 100644 index 000000000000..87f698d2f036 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsDeleteSample.js @@ -0,0 +1,40 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Delete Network Fabric resource. + * + * @summary Delete Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Delete_MaximumSet_Gen.json + */ +async function networkFabricsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "70A68989-24C0-4FA7-B1B2-8A2BB6D10CA8"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgNetworkFabrics"; + const networkFabricName = "lrhjxlxlhgvufessdcuetcwnto"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabrics.beginDeleteAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsDeprovisionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsDeprovisionSample.js new file mode 100644 index 000000000000..9b9f43b6e2ac --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsDeprovisionSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Deprovisions the underlying resources in the given Network Fabric instance. + * + * @summary Deprovisions the underlying resources in the given Network Fabric instance. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json + */ +async function networkFabricsDeprovisionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabrics.beginDeprovisionAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsDeprovisionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsGetSample.js new file mode 100644 index 000000000000..54aa57395716 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get Network Fabric resource details. + * + * @summary Get Network Fabric resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json + */ +async function networkFabricsGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabrics.get(resourceGroupName, networkFabricName); + console.log(result); +} + +async function main() { + networkFabricsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsListByResourceGroupSample.js new file mode 100644 index 000000000000..39f8b5722a5d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all the Network Fabric resources in the given resource group. + * + * @summary List all the Network Fabric resources in the given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkFabricsListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgNetworkFabrics"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkFabrics.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsListBySubscriptionSample.js new file mode 100644 index 000000000000..6f89b160b80a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all the Network Fabric resources in the given subscription. + * + * @summary List all the Network Fabric resources in the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricsListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkFabrics.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsProvisionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsProvisionSample.js new file mode 100644 index 000000000000..ffb81d384c84 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsProvisionSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Provisions the underlying resources in the given Network Fabric instance. + * + * @summary Provisions the underlying resources in the given Network Fabric instance. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_provision_MaximumSet_Gen.json + */ +async function networkFabricsProvisionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabrics.beginProvisionAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsProvisionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsUpdateSample.js new file mode 100644 index 000000000000..108d7a7ae0fe --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkFabricsUpdateSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Fabric resource. + * + * @summary Update certain properties of the Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Update_MaximumSet_Gen.json + */ +async function networkFabricsUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const body = { + annotation: "annotationValue", + tags: { key1758: "" }, + terminalServerConfiguration: { + password: "xxxxxxx", + serialNumber: "234567", + username: "username", + }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkFabrics.beginUpdateAndWait( + resourceGroupName, + networkFabricName, + body + ); + console.log(result); +} + +async function main() { + networkFabricsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesCreateSample.js new file mode 100644 index 000000000000..4cead5a0b9fd --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesCreateSample.js @@ -0,0 +1,43 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Create a Network Interface resource. + * + * @summary Create a Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Create_MaximumSet_Gen.json + */ +async function networkInterfacesCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body = { annotation: "null" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkInterfaces.beginCreateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesDeleteSample.js new file mode 100644 index 000000000000..8e08506dc0ec --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesDeleteSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Delete the Network Interface resource. + * + * @summary Delete the Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json + */ +async function networkInterfacesDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkInterfaces.beginDeleteAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesGetSample.js new file mode 100644 index 000000000000..13cd536a35ff --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesGetSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get the Network Interface resource details. + * + * @summary Get the Network Interface resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json + */ +async function networkInterfacesGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkInterfaces.get( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesGetStatusSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesGetStatusSample.js new file mode 100644 index 000000000000..3acd39cc6f6f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesGetStatusSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get the running status of the Network Interface. + * + * @summary Get the running status of the Network Interface. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_getStatus_MaximumSet_Gen.json + */ +async function networkInterfacesGetStatusMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkInterfaces.beginGetStatusAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesGetStatusMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesListSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesListSample.js new file mode 100644 index 000000000000..7a2efc647425 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesListSample.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all the Network Interface resources in a given resource group. + * + * @summary List all the Network Interface resources in a given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_List_MaximumSet_Gen.json + */ +async function networkInterfacesListMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkInterfaces.list(resourceGroupName, networkDeviceName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkInterfacesListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesUpdateAdministrativeStateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesUpdateAdministrativeStateSample.js new file mode 100644 index 000000000000..dde90e5e83a7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesUpdateAdministrativeStateSample.js @@ -0,0 +1,43 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update the admin state of the Network Interface. + * + * @summary Update the admin state of the Network Interface. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen.json + */ +async function networkInterfacesUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body = { state: "Enable" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkInterfaces.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesUpdateSample.js new file mode 100644 index 000000000000..8ff11b6df040 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkInterfacesUpdateSample.js @@ -0,0 +1,43 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Interface resource. + * + * @summary Update certain properties of the Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Update_MaximumSet_Gen.json + */ +async function networkInterfacesUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body = { annotation: "null" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkInterfaces.beginUpdateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRackSkusGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRackSkusGetSample.js new file mode 100644 index 000000000000..a1cd06561134 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRackSkusGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get Network Rack SKU resource. + * + * @summary Get Network Rack SKU resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json + */ +async function networkRackSkusGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkRackSkuName = "networkRackSkuName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkRackSkus.get(networkRackSkuName); + console.log(result); +} + +async function main() { + networkRackSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRackSkusListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRackSkusListBySubscriptionSample.js new file mode 100644 index 000000000000..6f360f9d5102 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRackSkusListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all Network Rack SKUs in the given subscription. + * + * @summary List all Network Rack SKUs in the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkRackSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkRackSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRackSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksCreateSample.js new file mode 100644 index 000000000000..60fb76f5b066 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksCreateSample.js @@ -0,0 +1,48 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Create Network Rack resource. + * + * @summary Create Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Create_MaximumSet_Gen.json + */ +async function networkRacksCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const body = { + annotation: "null", + location: "eastus", + networkFabricId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/networkFabricName", + networkRackSku: "RackSKU", + tags: { keyID: "keyValue" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkRacks.beginCreateAndWait( + resourceGroupName, + networkRackName, + body + ); + console.log(result); +} + +async function main() { + networkRacksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksDeleteSample.js new file mode 100644 index 000000000000..b346bf5caf8e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksDeleteSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Delete Network Rack resource. + * + * @summary Delete Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Delete_MaximumSet_Gen.json + */ +async function networkRacksDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkRacks.beginDeleteAndWait(resourceGroupName, networkRackName); + console.log(result); +} + +async function main() { + networkRacksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksGetSample.js new file mode 100644 index 000000000000..2a6c50d5c0c8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Get Network Rack resource details. + * + * @summary Get Network Rack resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json + */ +async function networkRacksGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkRacks.get(resourceGroupName, networkRackName); + console.log(result); +} + +async function main() { + networkRacksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksListByResourceGroupSample.js new file mode 100644 index 000000000000..0ff580034d96 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all Network Rack resources in the given resource group. + * + * @summary List all Network Rack resources in the given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkRacksListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkRacks.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRacksListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksListBySubscriptionSample.js new file mode 100644 index 000000000000..34b7359b2a8e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to List all Network Rack resources in the given subscription + * + * @summary List all Network Rack resources in the given subscription + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json + */ +async function networkRacksListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkRacks.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRacksListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksUpdateSample.js new file mode 100644 index 000000000000..954cb56969a5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkRacksUpdateSample.js @@ -0,0 +1,44 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Rack resource. + * + * @summary Update certain properties of the Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Update_MaximumSet_Gen.json + */ +async function networkRacksUpdateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const body = { + properties: {}, + tags: { keyID: "keyValue" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkRacks.beginUpdateAndWait( + resourceGroupName, + networkRackName, + body + ); + console.log(result); +} + +async function main() { + networkRacksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsCreateSample.js new file mode 100644 index 000000000000..e6c4b0c584b7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsCreateSample.js @@ -0,0 +1,60 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Configuration used to setup CE-PE connectivity PUT Method. + * + * @summary Configuration used to setup CE-PE connectivity PUT Method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const body = { + isManagementType: "True", + layer2Configuration: { mtu: 1500, portCount: 10 }, + layer3Configuration: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + peerASN: 50272, + primaryIpv4Prefix: "172.31.0.0/31", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "172.31.0.20/31", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 2064, + }, + nniType: "CE", + useOptionB: "False", + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkToNetworkInterconnects.beginCreateAndWait( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName, + body + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsDeleteSample.js new file mode 100644 index 000000000000..8e80f97aabbf --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsDeleteSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements NetworkToNetworkInterconnects DELETE method. + * + * @summary Implements NetworkToNetworkInterconnects DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkToNetworkInterconnects.beginDeleteAndWait( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsGetSample.js new file mode 100644 index 000000000000..58fe7b5e41be --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsGetSample.js @@ -0,0 +1,41 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements NetworkToNetworkInterconnects GET method. + * + * @summary Implements NetworkToNetworkInterconnects GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.networkToNetworkInterconnects.get( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsListSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsListSample.js new file mode 100644 index 000000000000..225b36a32b76 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/networkToNetworkInterconnectsListSample.js @@ -0,0 +1,42 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @summary Implements Network To Network Interconnects list by Network Fabric GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_List_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsListMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.networkToNetworkInterconnects.list( + resourceGroupName, + networkFabricName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkToNetworkInterconnectsListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/operationsListSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/operationsListSample.js new file mode 100644 index 000000000000..06068a54948c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/operationsListSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Returns list of all operations. + * + * @summary Returns list of all operations. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ListOperations.json + */ +async function listOperations() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listOperations(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/package.json b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/package.json new file mode 100644 index 000000000000..d91c49f2e114 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/package.json @@ -0,0 +1,32 @@ +{ + "name": "@azure-samples/arm-managednetworkfabric-js-beta", + "private": true, + "version": "1.0.0", + "description": " client library samples for JavaScript (Beta)", + "engines": { + "node": ">=14.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/managednetworkfabric/arm-managednetworkfabric" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managednetworkfabric/arm-managednetworkfabric", + "dependencies": { + "@azure/arm-managednetworkfabric": "next", + "dotenv": "latest", + "@azure/identity": "^2.0.1" + } +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesCreateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesCreateSample.js new file mode 100644 index 000000000000..46e3d9ba0856 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesCreateSample.js @@ -0,0 +1,98 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements Route Policy PUT method. + * + * @summary Implements Route Policy PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Create_MaximumSet_Gen.json + */ +async function routePoliciesCreateMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const body = { + annotation: "annotationValue", + location: "EastUS", + statements: [ + { + action: { + actionType: "Permit", + ipCommunityProperties: { + add: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName", + ], + }, + delete: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName", + ], + }, + set: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName", + ], + }, + }, + ipExtendedCommunityProperties: { + add: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName", + ], + }, + delete: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName", + ], + }, + set: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName", + ], + }, + }, + localPreference: 20, + }, + annotation: "annotationValue", + condition: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName", + ], + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName", + ], + ipPrefixId: + "subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix", + }, + sequenceNumber: 7, + }, + ], + tags: { key8254: "" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.routePolicies.beginCreateAndWait( + resourceGroupName, + routePolicyName, + body + ); + console.log(result); +} + +async function main() { + routePoliciesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesDeleteSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesDeleteSample.js new file mode 100644 index 000000000000..e61d07e806ee --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesDeleteSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements Route Policy DELETE method. + * + * @summary Implements Route Policy DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Delete_MaximumSet_Gen.json + */ +async function routePoliciesDeleteMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.routePolicies.beginDeleteAndWait(resourceGroupName, routePolicyName); + console.log(result); +} + +async function main() { + routePoliciesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesGetSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesGetSample.js new file mode 100644 index 000000000000..33e4db252c57 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesGetSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements Route Policy GET method. + * + * @summary Implements Route Policy GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json + */ +async function routePoliciesGetMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.routePolicies.get(resourceGroupName, routePolicyName); + console.log(result); +} + +async function main() { + routePoliciesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesListByResourceGroupSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesListByResourceGroupSample.js new file mode 100644 index 000000000000..22fa96d9e99a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesListByResourceGroupSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements RoutePolicies list by resource group GET method. + * + * @summary Implements RoutePolicies list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + */ +async function routePoliciesListByResourceGroupMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.routePolicies.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + routePoliciesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesListBySubscriptionSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesListBySubscriptionSample.js new file mode 100644 index 000000000000..602e3d9ea2fd --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesListBySubscriptionSample.js @@ -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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Implements RoutePolicies list by subscription GET method. + * + * @summary Implements RoutePolicies list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json + */ +async function routePoliciesListBySubscriptionMaximumSetGen() { + const subscriptionId = process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.routePolicies.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + routePoliciesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesUpdateSample.js b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesUpdateSample.js new file mode 100644 index 000000000000..30aac0559e6b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/routePoliciesUpdateSample.js @@ -0,0 +1,42 @@ +/* + * 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. +const { AzureNetworkFabricManagementServiceAPI } = require("@azure/arm-managednetworkfabric"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to API to update certain properties of the Route Policy resource. + * + * @summary API to update certain properties of the Route Policy resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Update_MaximumSet_Gen.json + */ +async function routePoliciesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "97D66995-95BA-464A-A250-FB6E25E499A8"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const routePolicyName = "routePolicyName"; + const body = { tags: { key8254: "" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId); + const result = await client.routePolicies.beginUpdateAndWait( + resourceGroupName, + routePolicyName, + body + ); + console.log(result); +} + +async function main() { + routePoliciesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/sample.env b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/javascript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/README.md b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/README.md new file mode 100644 index 000000000000..4b161a3dfd55 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/README.md @@ -0,0 +1,311 @@ +# client library samples for TypeScript (Beta) + +These sample programs show how to use the TypeScript client libraries for in some common scenarios. + +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [accessControlListsCreateSample.ts][accesscontrollistscreatesample] | Implements Access Control List PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Create_MinimumSet_Gen.json | +| [accessControlListsDeleteSample.ts][accesscontrollistsdeletesample] | Implements Access Control List DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Delete_MinimumSet_Gen.json | +| [accessControlListsGetSample.ts][accesscontrollistsgetsample] | Implements Access Control List GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json | +| [accessControlListsListByResourceGroupSample.ts][accesscontrollistslistbyresourcegroupsample] | Implements AccessControlLists list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListByResourceGroup_MinimumSet_Gen.json | +| [accessControlListsListBySubscriptionSample.ts][accesscontrollistslistbysubscriptionsample] | Implements AccessControlLists list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListBySubscription_MinimumSet_Gen.json | +| [accessControlListsUpdateSample.ts][accesscontrollistsupdatesample] | API to update certain properties of the Access Control List resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Update_MinimumSet_Gen.json | +| [externalNetworksClearArpEntriesSample.ts][externalnetworkscleararpentriessample] | clearArpEntries for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearArpEntries_MaximumSet_Gen.json | +| [externalNetworksClearIpv6NeighborsSample.ts][externalnetworksclearipv6neighborssample] | clearIpv6Neighbors for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json | +| [externalNetworksCreateSample.ts][externalnetworkscreatesample] | Creates ExternalNetwork PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Create_MaximumSet_Gen.json | +| [externalNetworksDeleteSample.ts][externalnetworksdeletesample] | Implements ExternalNetworks DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Delete_MaximumSet_Gen.json | +| [externalNetworksGetSample.ts][externalnetworksgetsample] | Implements ExternalNetworks GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json | +| [externalNetworksListSample.ts][externalnetworkslistsample] | Implements External Networks list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_List_MaximumSet_Gen.json | +| [externalNetworksUpdateAdministrativeStateSample.ts][externalnetworksupdateadministrativestatesample] | Executes update operation to enable or disable administrative State for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateAdministrativeState_MaximumSet_Gen.json | +| [externalNetworksUpdateBfdForBgpAdministrativeStateSample.ts][externalnetworksupdatebfdforbgpadministrativestatesample] | Update BfdForBgp for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json | +| [externalNetworksUpdateBgpAdministrativeStateSample.ts][externalnetworksupdatebgpadministrativestatesample] | Update BGP for externalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json | +| [externalNetworksUpdateSample.ts][externalnetworksupdatesample] | API to update certain properties of the ExternalNetworks resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Update_MaximumSet_Gen.json | +| [internalNetworksClearArpEntriesSample.ts][internalnetworkscleararpentriessample] | clearArpEntries for internalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearArpEntries_MaximumSet_Gen.json | +| [internalNetworksClearIpv6NeighborsSample.ts][internalnetworksclearipv6neighborssample] | clearIpv6Neighbors for internalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json | +| [internalNetworksCreateSample.ts][internalnetworkscreatesample] | Creates InternalNetwork PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Create_MaximumSet_Gen.json | +| [internalNetworksDeleteSample.ts][internalnetworksdeletesample] | Implements InternalNetworks DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Delete_MaximumSet_Gen.json | +| [internalNetworksGetSample.ts][internalnetworksgetsample] | Gets a InternalNetworks. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json | +| [internalNetworksListSample.ts][internalnetworkslistsample] | Displays InternalNetworks list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_List_MaximumSet_Gen.json | +| [internalNetworksUpdateAdministrativeStateSample.ts][internalnetworksupdateadministrativestatesample] | Update Administrative state of InternalNetworks on resources referred by their resource ids. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateAdministrativeState_MaximumSet_Gen.json | +| [internalNetworksUpdateBfdForBgpAdministrativeStateSample.ts][internalnetworksupdatebfdforbgpadministrativestatesample] | Update BfdForBgp for internalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json | +| [internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.ts][internalnetworksupdatebfdforstaticrouteadministrativestatesample] | Update BfdForStaticRoutes for internalNetwork. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen.json | +| [internalNetworksUpdateBgpAdministrativeStateSample.ts][internalnetworksupdatebgpadministrativestatesample] | Update BGP state for internalNetwork. Allowed only on edge devices. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json | +| [internalNetworksUpdateSample.ts][internalnetworksupdatesample] | Updates a InternalNetworks. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Update_MaximumSet_Gen.json | +| [ipCommunitiesCreateSample.ts][ipcommunitiescreatesample] | Implements an IP Community PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Create_MaximumSet_Gen.json | +| [ipCommunitiesDeleteSample.ts][ipcommunitiesdeletesample] | Implements IP Community DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Delete_MaximumSet_Gen.json | +| [ipCommunitiesGetSample.ts][ipcommunitiesgetsample] | Implements an IP Community GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json | +| [ipCommunitiesListByResourceGroupSample.ts][ipcommunitieslistbyresourcegroupsample] | Implements IpCommunities list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json | +| [ipCommunitiesListBySubscriptionSample.ts][ipcommunitieslistbysubscriptionsample] | Implements IpCommunities list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json | +| [ipCommunitiesUpdateSample.ts][ipcommunitiesupdatesample] | API to update certain properties of the IP Community resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Update_MaximumSet_Gen.json | +| [ipExtendedCommunitiesCreateSample.ts][ipextendedcommunitiescreatesample] | Implements IP Extended Community PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json | +| [ipExtendedCommunitiesDeleteSample.ts][ipextendedcommunitiesdeletesample] | Implements IP Extended Community DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json | +| [ipExtendedCommunitiesGetSample.ts][ipextendedcommunitiesgetsample] | Implements IP Extended Community GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json | +| [ipExtendedCommunitiesListByResourceGroupSample.ts][ipextendedcommunitieslistbyresourcegroupsample] | Implements IpExtendedCommunities list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json | +| [ipExtendedCommunitiesListBySubscriptionSample.ts][ipextendedcommunitieslistbysubscriptionsample] | Implements IpExtendedCommunities list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json | +| [ipExtendedCommunitiesUpdateSample.ts][ipextendedcommunitiesupdatesample] | API to update certain properties of the IP Extended Community resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json | +| [ipPrefixesCreateSample.ts][ipprefixescreatesample] | Implements IP Prefix PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Create_MaximumSet_Gen.json | +| [ipPrefixesDeleteSample.ts][ipprefixesdeletesample] | Implements IP Prefix DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Delete_MaximumSet_Gen.json | +| [ipPrefixesGetSample.ts][ipprefixesgetsample] | Implements IP Prefix GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json | +| [ipPrefixesListByResourceGroupSample.ts][ipprefixeslistbyresourcegroupsample] | Implements IpPrefixes list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json | +| [ipPrefixesListBySubscriptionSample.ts][ipprefixeslistbysubscriptionsample] | Implements IpPrefixes list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json | +| [ipPrefixesUpdateSample.ts][ipprefixesupdatesample] | API to update certain properties of the IP Prefix resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Update_MaximumSet_Gen.json | +| [l2IsolationDomainsClearArpTableSample.ts][l2isolationdomainscleararptablesample] | Clears ARP tables for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearArpTable_MaximumSet_Gen.json | +| [l2IsolationDomainsClearNeighborTableSample.ts][l2isolationdomainsclearneighbortablesample] | Clears IPv6 neighbors for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearNeighborTable_MaximumSet_Gen.json | +| [l2IsolationDomainsCreateSample.ts][l2isolationdomainscreatesample] | Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Create_MaximumSet_Gen.json | +| [l2IsolationDomainsDeleteSample.ts][l2isolationdomainsdeletesample] | Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json | +| [l2IsolationDomainsGetArpEntriesSample.ts][l2isolationdomainsgetarpentriessample] | Clears IPv6 neighbors for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_getArpEntries_MaximumSet_Gen.json | +| [l2IsolationDomainsGetSample.ts][l2isolationdomainsgetsample] | Implements L2 Isolation Domain GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json | +| [l2IsolationDomainsListByResourceGroupSample.ts][l2isolationdomainslistbyresourcegroupsample] | Displays L2IsolationDomains list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json | +| [l2IsolationDomainsListBySubscriptionSample.ts][l2isolationdomainslistbysubscriptionsample] | Displays L2IsolationDomains list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json | +| [l2IsolationDomainsUpdateAdministrativeStateSample.ts][l2isolationdomainsupdateadministrativestatesample] | Enables isolation domain across the fabric or on specified racks. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json | +| [l2IsolationDomainsUpdateSample.ts][l2isolationdomainsupdatesample] | API to update certain properties of the L2 Isolation Domain resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Update_MaximumSet_Gen.json | +| [l3IsolationDomainsClearArpTableSample.ts][l3isolationdomainscleararptablesample] | Clears ARP tables for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearArpTable_MaximumSet_Gen.json | +| [l3IsolationDomainsClearNeighborTableSample.ts][l3isolationdomainsclearneighbortablesample] | Clears IPv6 neighbor tables for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearNeighborTable_MaximumSet_Gen.json | +| [l3IsolationDomainsCreateSample.ts][l3isolationdomainscreatesample] | Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Create_MaximumSet_Gen.json | +| [l3IsolationDomainsDeleteSample.ts][l3isolationdomainsdeletesample] | Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json | +| [l3IsolationDomainsGetSample.ts][l3isolationdomainsgetsample] | Retrieves details of this L3 Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json | +| [l3IsolationDomainsListByResourceGroupSample.ts][l3isolationdomainslistbyresourcegroupsample] | Displays L3IsolationDomains list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json | +| [l3IsolationDomainsListBySubscriptionSample.ts][l3isolationdomainslistbysubscriptionsample] | Displays L3IsolationDomains list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json | +| [l3IsolationDomainsUpdateAdministrativeStateSample.ts][l3isolationdomainsupdateadministrativestatesample] | Enables racks for this Isolation Domain. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json | +| [l3IsolationDomainsUpdateOptionBAdministrativeStateSample.ts][l3isolationdomainsupdateoptionbadministrativestatesample] | Update administrative state of option B on CE devices x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen.json | +| [l3IsolationDomainsUpdateSample.ts][l3isolationdomainsupdatesample] | API to update certain properties of the L3 Isolation Domain resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Update_MaximumSet_Gen.json | +| [networkDeviceSkusGetSample.ts][networkdeviceskusgetsample] | Get Network Device SKU details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json | +| [networkDeviceSkusListBySubscriptionSample.ts][networkdeviceskuslistbysubscriptionsample] | List Network Device SKUs for the given subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json | +| [networkDevicesCreateSample.ts][networkdevicescreatesample] | Create a Network Device resource x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Create_MaximumSet_Gen.json | +| [networkDevicesDeleteSample.ts][networkdevicesdeletesample] | Delete the Network Device resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Delete_MaximumSet_Gen.json | +| [networkDevicesGenerateSupportPackageSample.ts][networkdevicesgeneratesupportpackagesample] | Generate Support Package for the given Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_generateSupportPackage_MaximumSet_Gen.json | +| [networkDevicesGetDynamicInterfaceMapsSample.ts][networkdevicesgetdynamicinterfacemapssample] | Get the dynamic interface maps for the given Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen.json | +| [networkDevicesGetSample.ts][networkdevicesgetsample] | Get the Network Device resource details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json | +| [networkDevicesGetStaticInterfaceMapsSample.ts][networkdevicesgetstaticinterfacemapssample] | Get the static interface maps for the given Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen.json | +| [networkDevicesGetStatusSample.ts][networkdevicesgetstatussample] | Get the running status of the Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStatus_MaximumSet_Gen.json | +| [networkDevicesListByResourceGroupSample.ts][networkdeviceslistbyresourcegroupsample] | List all the Network Device resources in a given resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json | +| [networkDevicesListBySubscriptionSample.ts][networkdeviceslistbysubscriptionsample] | List all the Network Device resources in a given subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json | +| [networkDevicesRebootSample.ts][networkdevicesrebootsample] | Reboot the Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_reboot_MaximumSet_Gen.json | +| [networkDevicesRestoreConfigSample.ts][networkdevicesrestoreconfigsample] | Restore the configuration of the Network Device resource to last known good configuration. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_restoreConfig_MaximumSet_Gen.json | +| [networkDevicesUpdatePowerCycleSample.ts][networkdevicesupdatepowercyclesample] | Update PDU power cycle of the Network Device. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updatePowerCycle_MaximumSet_Gen.json | +| [networkDevicesUpdateSample.ts][networkdevicesupdatesample] | Update certain properties of the Network Device resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Update_MaximumSet_Gen.json | +| [networkDevicesUpdateVersionSample.ts][networkdevicesupdateversionsample] | Update the SKU version of the Network Device resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updateVersion_MaximumSet_Gen.json | +| [networkFabricControllersCreateSample.ts][networkfabriccontrollerscreatesample] | Creates a Network Fabric Controller. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json | +| [networkFabricControllersDeleteSample.ts][networkfabriccontrollersdeletesample] | Deletes the Network Fabric Controller resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json | +| [networkFabricControllersDisableWorkloadManagementNetworkSample.ts][networkfabriccontrollersdisableworkloadmanagementnetworksample] | Disables the workloadManagementNetwork (Tenant Network). x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen.json | +| [networkFabricControllersEnableWorkloadManagementNetworkSample.ts][networkfabriccontrollersenableworkloadmanagementnetworksample] | Enables the workloadManagementNetwork (Tenant Network). x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen.json | +| [networkFabricControllersGetSample.ts][networkfabriccontrollersgetsample] | Shows the provisioning status of Network Fabric Controller. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json | +| [networkFabricControllersListByResourceGroupSample.ts][networkfabriccontrollerslistbyresourcegroupsample] | Lists all the NetworkFabricControllers thats available in the resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json | +| [networkFabricControllersListBySubscriptionSample.ts][networkfabriccontrollerslistbysubscriptionsample] | Lists all the NetworkFabricControllers by subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json | +| [networkFabricControllersUpdateSample.ts][networkfabriccontrollersupdatesample] | Updates are currently not supported for the Network Fabric Controller resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json | +| [networkFabricSkusGetSample.ts][networkfabricskusgetsample] | Implements Network Fabric Sku GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json | +| [networkFabricSkusListBySubscriptionSample.ts][networkfabricskuslistbysubscriptionsample] | Implements NetworkFabricSkus list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json | +| [networkFabricsCreateSample.ts][networkfabricscreatesample] | Create Network Fabric resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Create_MaximumSet_Gen.json | +| [networkFabricsDeleteSample.ts][networkfabricsdeletesample] | Delete Network Fabric resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Delete_MaximumSet_Gen.json | +| [networkFabricsDeprovisionSample.ts][networkfabricsdeprovisionsample] | Deprovisions the underlying resources in the given Network Fabric instance. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json | +| [networkFabricsGetSample.ts][networkfabricsgetsample] | Get Network Fabric resource details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json | +| [networkFabricsListByResourceGroupSample.ts][networkfabricslistbyresourcegroupsample] | List all the Network Fabric resources in the given resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json | +| [networkFabricsListBySubscriptionSample.ts][networkfabricslistbysubscriptionsample] | List all the Network Fabric resources in the given subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json | +| [networkFabricsProvisionSample.ts][networkfabricsprovisionsample] | Provisions the underlying resources in the given Network Fabric instance. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_provision_MaximumSet_Gen.json | +| [networkFabricsUpdateSample.ts][networkfabricsupdatesample] | Update certain properties of the Network Fabric resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Update_MaximumSet_Gen.json | +| [networkInterfacesCreateSample.ts][networkinterfacescreatesample] | Create a Network Interface resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Create_MaximumSet_Gen.json | +| [networkInterfacesDeleteSample.ts][networkinterfacesdeletesample] | Delete the Network Interface resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json | +| [networkInterfacesGetSample.ts][networkinterfacesgetsample] | Get the Network Interface resource details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json | +| [networkInterfacesGetStatusSample.ts][networkinterfacesgetstatussample] | Get the running status of the Network Interface. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_getStatus_MaximumSet_Gen.json | +| [networkInterfacesListSample.ts][networkinterfaceslistsample] | List all the Network Interface resources in a given resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_List_MaximumSet_Gen.json | +| [networkInterfacesUpdateAdministrativeStateSample.ts][networkinterfacesupdateadministrativestatesample] | Update the admin state of the Network Interface. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen.json | +| [networkInterfacesUpdateSample.ts][networkinterfacesupdatesample] | Update certain properties of the Network Interface resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Update_MaximumSet_Gen.json | +| [networkRackSkusGetSample.ts][networkrackskusgetsample] | Get Network Rack SKU resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json | +| [networkRackSkusListBySubscriptionSample.ts][networkrackskuslistbysubscriptionsample] | List all Network Rack SKUs in the given subscription. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_ListBySubscription_MaximumSet_Gen.json | +| [networkRacksCreateSample.ts][networkrackscreatesample] | Create Network Rack resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Create_MaximumSet_Gen.json | +| [networkRacksDeleteSample.ts][networkracksdeletesample] | Delete Network Rack resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Delete_MaximumSet_Gen.json | +| [networkRacksGetSample.ts][networkracksgetsample] | Get Network Rack resource details. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json | +| [networkRacksListByResourceGroupSample.ts][networkrackslistbyresourcegroupsample] | List all Network Rack resources in the given resource group. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json | +| [networkRacksListBySubscriptionSample.ts][networkrackslistbysubscriptionsample] | List all Network Rack resources in the given subscription x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json | +| [networkRacksUpdateSample.ts][networkracksupdatesample] | Update certain properties of the Network Rack resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Update_MaximumSet_Gen.json | +| [networkToNetworkInterconnectsCreateSample.ts][networktonetworkinterconnectscreatesample] | Configuration used to setup CE-PE connectivity PUT Method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json | +| [networkToNetworkInterconnectsDeleteSample.ts][networktonetworkinterconnectsdeletesample] | Implements NetworkToNetworkInterconnects DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json | +| [networkToNetworkInterconnectsGetSample.ts][networktonetworkinterconnectsgetsample] | Implements NetworkToNetworkInterconnects GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json | +| [networkToNetworkInterconnectsListSample.ts][networktonetworkinterconnectslistsample] | Implements Network To Network Interconnects list by Network Fabric GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_List_MaximumSet_Gen.json | +| [operationsListSample.ts][operationslistsample] | Returns list of all operations. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ListOperations.json | +| [routePoliciesCreateSample.ts][routepoliciescreatesample] | Implements Route Policy PUT method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Create_MaximumSet_Gen.json | +| [routePoliciesDeleteSample.ts][routepoliciesdeletesample] | Implements Route Policy DELETE method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Delete_MaximumSet_Gen.json | +| [routePoliciesGetSample.ts][routepoliciesgetsample] | Implements Route Policy GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json | +| [routePoliciesListByResourceGroupSample.ts][routepolicieslistbyresourcegroupsample] | Implements RoutePolicies list by resource group GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json | +| [routePoliciesListBySubscriptionSample.ts][routepolicieslistbysubscriptionsample] | Implements RoutePolicies list by subscription GET method. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json | +| [routePoliciesUpdateSample.ts][routepoliciesupdatesample] | API to update certain properties of the Route Policy resource. x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Update_MaximumSet_Gen.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/accessControlListsCreateSample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID="" MANAGEDNETWORKFABRIC_RESOURCE_GROUP="" node dist/accessControlListsCreateSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[accesscontrollistscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsCreateSample.ts +[accesscontrollistsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsDeleteSample.ts +[accesscontrollistsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsGetSample.ts +[accesscontrollistslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsListByResourceGroupSample.ts +[accesscontrollistslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsListBySubscriptionSample.ts +[accesscontrollistsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsUpdateSample.ts +[externalnetworkscleararpentriessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksClearArpEntriesSample.ts +[externalnetworksclearipv6neighborssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksClearIpv6NeighborsSample.ts +[externalnetworkscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksCreateSample.ts +[externalnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksDeleteSample.ts +[externalnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksGetSample.ts +[externalnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksListSample.ts +[externalnetworksupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateAdministrativeStateSample.ts +[externalnetworksupdatebfdforbgpadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateBfdForBgpAdministrativeStateSample.ts +[externalnetworksupdatebgpadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateBgpAdministrativeStateSample.ts +[externalnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateSample.ts +[internalnetworkscleararpentriessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksClearArpEntriesSample.ts +[internalnetworksclearipv6neighborssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksClearIpv6NeighborsSample.ts +[internalnetworkscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksCreateSample.ts +[internalnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksDeleteSample.ts +[internalnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksGetSample.ts +[internalnetworkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksListSample.ts +[internalnetworksupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateAdministrativeStateSample.ts +[internalnetworksupdatebfdforbgpadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBfdForBgpAdministrativeStateSample.ts +[internalnetworksupdatebfdforstaticrouteadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.ts +[internalnetworksupdatebgpadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBgpAdministrativeStateSample.ts +[internalnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateSample.ts +[ipcommunitiescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesCreateSample.ts +[ipcommunitiesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesDeleteSample.ts +[ipcommunitiesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesGetSample.ts +[ipcommunitieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesListByResourceGroupSample.ts +[ipcommunitieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesListBySubscriptionSample.ts +[ipcommunitiesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesUpdateSample.ts +[ipextendedcommunitiescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesCreateSample.ts +[ipextendedcommunitiesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesDeleteSample.ts +[ipextendedcommunitiesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesGetSample.ts +[ipextendedcommunitieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesListByResourceGroupSample.ts +[ipextendedcommunitieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesListBySubscriptionSample.ts +[ipextendedcommunitiesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesUpdateSample.ts +[ipprefixescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesCreateSample.ts +[ipprefixesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesDeleteSample.ts +[ipprefixesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesGetSample.ts +[ipprefixeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesListByResourceGroupSample.ts +[ipprefixeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesListBySubscriptionSample.ts +[ipprefixesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesUpdateSample.ts +[l2isolationdomainscleararptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsClearArpTableSample.ts +[l2isolationdomainsclearneighbortablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsClearNeighborTableSample.ts +[l2isolationdomainscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsCreateSample.ts +[l2isolationdomainsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsDeleteSample.ts +[l2isolationdomainsgetarpentriessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsGetArpEntriesSample.ts +[l2isolationdomainsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsGetSample.ts +[l2isolationdomainslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsListByResourceGroupSample.ts +[l2isolationdomainslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsListBySubscriptionSample.ts +[l2isolationdomainsupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsUpdateAdministrativeStateSample.ts +[l2isolationdomainsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsUpdateSample.ts +[l3isolationdomainscleararptablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsClearArpTableSample.ts +[l3isolationdomainsclearneighbortablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsClearNeighborTableSample.ts +[l3isolationdomainscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsCreateSample.ts +[l3isolationdomainsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsDeleteSample.ts +[l3isolationdomainsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsGetSample.ts +[l3isolationdomainslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsListByResourceGroupSample.ts +[l3isolationdomainslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsListBySubscriptionSample.ts +[l3isolationdomainsupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateAdministrativeStateSample.ts +[l3isolationdomainsupdateoptionbadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.ts +[l3isolationdomainsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateSample.ts +[networkdeviceskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDeviceSkusGetSample.ts +[networkdeviceskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDeviceSkusListBySubscriptionSample.ts +[networkdevicescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesCreateSample.ts +[networkdevicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesDeleteSample.ts +[networkdevicesgeneratesupportpackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGenerateSupportPackageSample.ts +[networkdevicesgetdynamicinterfacemapssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetDynamicInterfaceMapsSample.ts +[networkdevicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetSample.ts +[networkdevicesgetstaticinterfacemapssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetStaticInterfaceMapsSample.ts +[networkdevicesgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetStatusSample.ts +[networkdeviceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesListByResourceGroupSample.ts +[networkdeviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesListBySubscriptionSample.ts +[networkdevicesrebootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesRebootSample.ts +[networkdevicesrestoreconfigsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesRestoreConfigSample.ts +[networkdevicesupdatepowercyclesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdatePowerCycleSample.ts +[networkdevicesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdateSample.ts +[networkdevicesupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdateVersionSample.ts +[networkfabriccontrollerscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersCreateSample.ts +[networkfabriccontrollersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersDeleteSample.ts +[networkfabriccontrollersdisableworkloadmanagementnetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersDisableWorkloadManagementNetworkSample.ts +[networkfabriccontrollersenableworkloadmanagementnetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersEnableWorkloadManagementNetworkSample.ts +[networkfabriccontrollersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersGetSample.ts +[networkfabriccontrollerslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersListByResourceGroupSample.ts +[networkfabriccontrollerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersListBySubscriptionSample.ts +[networkfabriccontrollersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersUpdateSample.ts +[networkfabricskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricSkusGetSample.ts +[networkfabricskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricSkusListBySubscriptionSample.ts +[networkfabricscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsCreateSample.ts +[networkfabricsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsDeleteSample.ts +[networkfabricsdeprovisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsDeprovisionSample.ts +[networkfabricsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsGetSample.ts +[networkfabricslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsListByResourceGroupSample.ts +[networkfabricslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsListBySubscriptionSample.ts +[networkfabricsprovisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsProvisionSample.ts +[networkfabricsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsUpdateSample.ts +[networkinterfacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesCreateSample.ts +[networkinterfacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesDeleteSample.ts +[networkinterfacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesGetSample.ts +[networkinterfacesgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesGetStatusSample.ts +[networkinterfaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesListSample.ts +[networkinterfacesupdateadministrativestatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesUpdateAdministrativeStateSample.ts +[networkinterfacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesUpdateSample.ts +[networkrackskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRackSkusGetSample.ts +[networkrackskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRackSkusListBySubscriptionSample.ts +[networkrackscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksCreateSample.ts +[networkracksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksDeleteSample.ts +[networkracksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksGetSample.ts +[networkrackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksListByResourceGroupSample.ts +[networkrackslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksListBySubscriptionSample.ts +[networkracksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksUpdateSample.ts +[networktonetworkinterconnectscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsCreateSample.ts +[networktonetworkinterconnectsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsDeleteSample.ts +[networktonetworkinterconnectsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsGetSample.ts +[networktonetworkinterconnectslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsListSample.ts +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/operationsListSample.ts +[routepoliciescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesCreateSample.ts +[routepoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesDeleteSample.ts +[routepoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesGetSample.ts +[routepolicieslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesListByResourceGroupSample.ts +[routepolicieslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesListBySubscriptionSample.ts +[routepoliciesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesUpdateSample.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-managednetworkfabric?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managednetworkfabric/arm-managednetworkfabric/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/package.json b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/package.json new file mode 100644 index 000000000000..25aa58da1192 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/package.json @@ -0,0 +1,41 @@ +{ + "name": "@azure-samples/arm-managednetworkfabric-ts-beta", + "private": true, + "version": "1.0.0", + "description": " client library samples for TypeScript (Beta)", + "engines": { + "node": ">=14.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/managednetworkfabric/arm-managednetworkfabric" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managednetworkfabric/arm-managednetworkfabric", + "dependencies": { + "@azure/arm-managednetworkfabric": "next", + "dotenv": "latest", + "@azure/identity": "^2.0.1" + }, + "devDependencies": { + "@types/node": "^14.0.0", + "typescript": "~5.0.0", + "rimraf": "latest" + } +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/sample.env b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsCreateSample.ts new file mode 100644 index 000000000000..65a9b6d4b2d8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsCreateSample.ts @@ -0,0 +1,64 @@ +/* + * 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 { + AccessControlList, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Access Control List PUT method. + * + * @summary Implements Access Control List PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Create_MinimumSet_Gen.json + */ +async function accessControlListsCreateMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const body: AccessControlList = { + addressFamily: "ipv4", + conditions: [ + { + action: "allow", + destinationAddress: "1.1.1.1", + destinationPort: "21", + sequenceNumber: 3, + sourceAddress: "2.2.2.2", + sourcePort: "65000", + protocol: 6 + } + ], + location: "EastUs" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.accessControlLists.create( + resourceGroupName, + accessControlListName, + body + ); + console.log(result); +} + +async function main() { + accessControlListsCreateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsDeleteSample.ts new file mode 100644 index 000000000000..646181ff42a8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Access Control List DELETE method. + * + * @summary Implements Access Control List DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Delete_MinimumSet_Gen.json + */ +async function accessControlListsDeleteMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "subscriptionId"; + const accessControlListName = "aclOne"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.accessControlLists.delete( + resourceGroupName, + accessControlListName + ); + console.log(result); +} + +async function main() { + accessControlListsDeleteMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsGetSample.ts new file mode 100644 index 000000000000..7c57ae1520a6 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Access Control List GET method. + * + * @summary Implements Access Control List GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json + */ +async function accessControlListsGetMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.accessControlLists.get( + resourceGroupName, + accessControlListName + ); + console.log(result); +} + +async function main() { + accessControlListsGetMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsListByResourceGroupSample.ts new file mode 100644 index 000000000000..b1413535da8b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements AccessControlLists list by resource group GET method. + * + * @summary Implements AccessControlLists list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListByResourceGroup_MinimumSet_Gen.json + */ +async function accessControlListsListByResourceGroupMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.accessControlLists.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + accessControlListsListByResourceGroupMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsListBySubscriptionSample.ts new file mode 100644 index 000000000000..641a376df61e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements AccessControlLists list by subscription GET method. + * + * @summary Implements AccessControlLists list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListBySubscription_MinimumSet_Gen.json + */ +async function accessControlListsListBySubscriptionMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.accessControlLists.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + accessControlListsListBySubscriptionMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsUpdateSample.ts new file mode 100644 index 000000000000..a617cccb7564 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/accessControlListsUpdateSample.ts @@ -0,0 +1,63 @@ +/* + * 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 { + AccessControlListPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the Access Control List resource. + * + * @summary API to update certain properties of the Access Control List resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Update_MinimumSet_Gen.json + */ +async function accessControlListsUpdateMinimumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const accessControlListName = "aclOne"; + const body: AccessControlListPatch = { + addressFamily: "ipv4", + conditions: [ + { + action: "allow", + destinationAddress: "1.1.1.2", + destinationPort: "21", + sequenceNumber: 4, + sourceAddress: "2.2.2.3", + sourcePort: "65000", + protocol: 6 + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.accessControlLists.update( + resourceGroupName, + accessControlListName, + body + ); + console.log(result); +} + +async function main() { + accessControlListsUpdateMinimumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksClearArpEntriesSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksClearArpEntriesSample.ts new file mode 100644 index 000000000000..4df6a52ce248 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksClearArpEntriesSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to clearArpEntries for externalNetwork. + * + * @summary clearArpEntries for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearArpEntries_MaximumSet_Gen.json + */ +async function externalNetworksClearArpEntriesMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginClearArpEntriesAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksClearArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksClearIpv6NeighborsSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksClearIpv6NeighborsSample.ts new file mode 100644 index 000000000000..1fbfa382fbbe --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksClearIpv6NeighborsSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to clearIpv6Neighbors for externalNetwork. + * + * @summary clearIpv6Neighbors for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json + */ +async function externalNetworksClearIpv6NeighborsMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginClearIpv6NeighborsAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksClearIpv6NeighborsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksCreateSample.ts new file mode 100644 index 000000000000..9439f95097c2 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksCreateSample.ts @@ -0,0 +1,72 @@ +/* + * 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 { + ExternalNetwork, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates ExternalNetwork PUT method. + * + * @summary Creates ExternalNetwork PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Create_MaximumSet_Gen.json + */ +async function externalNetworksCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: ExternalNetwork = { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + optionAProperties: { + bfdConfiguration: {}, + mtu: 1500, + peerASN: 65047, + primaryIpv4Prefix: "10.1.1.0/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "10.1.1.4/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 1001 + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"] + }, + peeringOption: "OptionA" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksDeleteSample.ts new file mode 100644 index 000000000000..176fd24c77f9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements ExternalNetworks DELETE method. + * + * @summary Implements ExternalNetworks DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Delete_MaximumSet_Gen.json + */ +async function externalNetworksDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName + ); + console.log(result); +} + +async function main() { + externalNetworksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksGetSample.ts new file mode 100644 index 000000000000..baf2ed492117 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements ExternalNetworks GET method. + * + * @summary Implements ExternalNetworks GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json + */ +async function externalNetworksGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.get( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName + ); + console.log(result); +} + +async function main() { + externalNetworksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksListSample.ts new file mode 100644 index 000000000000..2d2bee2813d2 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksListSample.ts @@ -0,0 +1,48 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements External Networks list by resource group GET method. + * + * @summary Implements External Networks list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_List_MaximumSet_Gen.json + */ +async function externalNetworksListMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.externalNetworks.list( + resourceGroupName, + l3IsolationDomainName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + externalNetworksListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..eaca6d1da125 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Executes update operation to enable or disable administrative State for externalNetwork. + * + * @summary Executes update operation to enable or disable administrative State for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateBfdForBgpAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateBfdForBgpAdministrativeStateSample.ts new file mode 100644 index 000000000000..dc7332221b70 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateBfdForBgpAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BfdForBgp for externalNetwork. + * + * @summary Update BfdForBgp for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateBgpAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateBgpAdministrativeStateSample.ts new file mode 100644 index 000000000000..2ec2c5b55744 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateBgpAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BGP for externalNetwork. + * + * @summary Update BGP for externalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + */ +async function externalNetworksUpdateBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateSample.ts new file mode 100644 index 000000000000..2d92f020311d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/externalNetworksUpdateSample.ts @@ -0,0 +1,73 @@ +/* + * 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 { + ExternalNetworkPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the ExternalNetworks resource. + * + * @summary API to update certain properties of the ExternalNetworks resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Update_MaximumSet_Gen.json + */ +async function externalNetworksUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const externalNetworkName = "example-externalnetwork"; + const body: ExternalNetworkPatch = { + annotation: "Lab 1", + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + optionAProperties: { + bfdConfiguration: {}, + mtu: 1500, + peerASN: 65047, + primaryIpv4Prefix: "10.1.1.0/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "10.1.1.4/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 1001 + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"] + }, + peeringOption: "OptionA" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.externalNetworks.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body + ); + console.log(result); +} + +async function main() { + externalNetworksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksClearArpEntriesSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksClearArpEntriesSample.ts new file mode 100644 index 000000000000..9929f0865bd3 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksClearArpEntriesSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to clearArpEntries for internalNetwork. + * + * @summary clearArpEntries for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearArpEntries_MaximumSet_Gen.json + */ +async function internalNetworksClearArpEntriesMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginClearArpEntriesAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksClearArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksClearIpv6NeighborsSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksClearIpv6NeighborsSample.ts new file mode 100644 index 000000000000..9f83c8e0338d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksClearIpv6NeighborsSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to clearIpv6Neighbors for internalNetwork. + * + * @summary clearIpv6Neighbors for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json + */ +async function internalNetworksClearIpv6NeighborsMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginClearIpv6NeighborsAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksClearIpv6NeighborsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksCreateSample.ts new file mode 100644 index 000000000000..76b1389ff603 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksCreateSample.ts @@ -0,0 +1,77 @@ +/* + * 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 { + InternalNetwork, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates InternalNetwork PUT method. + * + * @summary Creates InternalNetwork PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Create_MaximumSet_Gen.json + */ +async function internalNetworksCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: InternalNetwork = { + bgpConfiguration: { + allowAS: 1, + allowASOverride: "Enable", + bfdConfiguration: {}, + defaultRouteOriginate: "True", + ipv4ListenRangePrefixes: ["10.1.0.0/25"], + ipv4NeighborAddress: [{ address: "10.1.0.0" }], + ipv6ListenRangePrefixes: ["2fff::/66"], + ipv6NeighborAddress: [{ address: "2fff::" }], + peerASN: 6 + }, + connectedIPv4Subnets: [{ prefix: "10.0.0.0/24" }], + connectedIPv6Subnets: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }], + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + mtu: 1500, + staticRouteConfiguration: { + bfdConfiguration: {}, + ipv4Routes: [{ nextHop: ["10.0.0.1"], prefix: "10.1.0.0/24" }], + ipv6Routes: [{ nextHop: ["2ffe::1"], prefix: "2fff::/64" }] + }, + vlanId: 501 + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksDeleteSample.ts new file mode 100644 index 000000000000..d4dbfb1b2438 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements InternalNetworks DELETE method. + * + * @summary Implements InternalNetworks DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Delete_MaximumSet_Gen.json + */ +async function internalNetworksDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName + ); + console.log(result); +} + +async function main() { + internalNetworksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksGetSample.ts new file mode 100644 index 000000000000..88ade242d130 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets a InternalNetworks. + * + * @summary Gets a InternalNetworks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json + */ +async function internalNetworksGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.get( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName + ); + console.log(result); +} + +async function main() { + internalNetworksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksListSample.ts new file mode 100644 index 000000000000..5519245a5e5d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksListSample.ts @@ -0,0 +1,48 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays InternalNetworks list by resource group GET method. + * + * @summary Displays InternalNetworks list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_List_MaximumSet_Gen.json + */ +async function internalNetworksListMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.internalNetworks.list( + resourceGroupName, + l3IsolationDomainName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + internalNetworksListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..28e3711a9ddc --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update Administrative state of InternalNetworks on resources referred by their resource ids. + * + * @summary Update Administrative state of InternalNetworks on resources referred by their resource ids. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBfdForBgpAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBfdForBgpAdministrativeStateSample.ts new file mode 100644 index 000000000000..c47a803d8f6d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBfdForBgpAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BfdForBgp for internalNetwork. + * + * @summary Update BfdForBgp for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.ts new file mode 100644 index 000000000000..c06d00870fdb --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBfdForStaticRouteAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BfdForStaticRoutes for internalNetwork. + * + * @summary Update BfdForStaticRoutes for internalNetwork. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateBfdForStaticRouteAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBgpAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBgpAdministrativeStateSample.ts new file mode 100644 index 000000000000..5b9078792d83 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateBgpAdministrativeStateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update BGP state for internalNetwork. Allowed only on edge devices. + * + * @summary Update BGP state for internalNetwork. Allowed only on edge devices. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + */ +async function internalNetworksUpdateBgpAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateBgpAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateSample.ts new file mode 100644 index 000000000000..ece280392ade --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/internalNetworksUpdateSample.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + InternalNetworkPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates a InternalNetworks. + * + * @summary Updates a InternalNetworks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Update_MaximumSet_Gen.json + */ +async function internalNetworksUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const internalNetworkName = "example-internalnetwork"; + const body: InternalNetworkPatch = { + bgpConfiguration: { + allowAS: 1, + allowASOverride: "Enable", + bfdConfiguration: {}, + defaultRouteOriginate: "True", + ipv4ListenRangePrefixes: ["10.1.0.0/25"], + ipv4NeighborAddress: [{ address: "10.1.0.0" }], + ipv6ListenRangePrefixes: ["2fff::/66"], + ipv6NeighborAddress: [{ address: "2fff::" }], + peerASN: 6 + }, + connectedIPv4Subnets: [{ prefix: "10.0.0.0/24" }], + connectedIPv6Subnets: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }], + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + mtu: 1500, + staticRouteConfiguration: { + bfdConfiguration: {}, + ipv4Routes: [{ nextHop: ["10.0.0.1"], prefix: "10.1.0.0/24" }], + ipv6Routes: [{ nextHop: ["2ffe::1"], prefix: "2fff::/64" }] + } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.internalNetworks.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body + ); + console.log(result); +} + +async function main() { + internalNetworksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesCreateSample.ts new file mode 100644 index 000000000000..64029c2c1b94 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesCreateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + IpCommunity, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements an IP Community PUT method. + * + * @summary Implements an IP Community PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Create_MaximumSet_Gen.json + */ +async function ipCommunitiesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpCommunityLists"; + const ipCommunityName = "example-ipCommunity"; + const body: IpCommunity = { + action: "Permit", + annotation: "annotationValue", + communityMembers: ["1234:5678"], + location: "EastUS", + tags: { key2814: "" }, + wellKnownCommunities: ["Internet", "LocalAS", "NoExport", "GShut"] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipCommunities.beginCreateAndWait( + resourceGroupName, + ipCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipCommunitiesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesDeleteSample.ts new file mode 100644 index 000000000000..bf59c2c9e195 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Community DELETE method. + * + * @summary Implements IP Community DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Delete_MaximumSet_Gen.json + */ +async function ipCommunitiesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "IpCommunityList1"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipCommunities.beginDeleteAndWait( + resourceGroupName, + ipCommunityName + ); + console.log(result); +} + +async function main() { + ipCommunitiesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesGetSample.ts new file mode 100644 index 000000000000..945ba2072845 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements an IP Community GET method. + * + * @summary Implements an IP Community GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json + */ +async function ipCommunitiesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "example-ipCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipCommunities.get( + resourceGroupName, + ipCommunityName + ); + console.log(result); +} + +async function main() { + ipCommunitiesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesListByResourceGroupSample.ts new file mode 100644 index 000000000000..5c0ede5a35f4 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpCommunities list by resource group GET method. + * + * @summary Implements IpCommunities list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipCommunitiesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipCommunities.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipCommunitiesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesListBySubscriptionSample.ts new file mode 100644 index 000000000000..464725791299 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpCommunities list by subscription GET method. + * + * @summary Implements IpCommunities list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json + */ +async function ipCommunitiesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipCommunities.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipCommunitiesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesUpdateSample.ts new file mode 100644 index 000000000000..0b12b6633030 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipCommunitiesUpdateSample.ts @@ -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 { + IpCommunityPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Community resource. + * + * @summary API to update certain properties of the IP Community resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Update_MaximumSet_Gen.json + */ +async function ipCommunitiesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const ipCommunityName = "example-ipCommunity"; + const body: IpCommunityPatch = { tags: { key2814: "" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipCommunities.beginUpdateAndWait( + resourceGroupName, + ipCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipCommunitiesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesCreateSample.ts new file mode 100644 index 000000000000..ba64f36256ca --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesCreateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + IpExtendedCommunity, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Extended Community PUT method. + * + * @summary Implements IP Extended Community PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const body: IpExtendedCommunity = { + action: "Permit", + annotation: "annotationValue", + location: "EastUs", + routeTargets: ["1234:5678"], + tags: { key5054: "key" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipExtendedCommunities.beginCreateAndWait( + resourceGroupName, + ipExtendedCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesDeleteSample.ts new file mode 100644 index 000000000000..43e8777f55f7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Extended Community DELETE method. + * + * @summary Implements IP Extended Community DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipExtendedCommunities.beginDeleteAndWait( + resourceGroupName, + ipExtendedCommunityName + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesGetSample.ts new file mode 100644 index 000000000000..c269912fe944 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesGetSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Extended Community GET method. + * + * @summary Implements IP Extended Community GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipExtendedCommunities.get( + resourceGroupName, + ipExtendedCommunityName + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesListByResourceGroupSample.ts new file mode 100644 index 000000000000..8eb8171f862a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesListByResourceGroupSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpExtendedCommunities list by resource group GET method. + * + * @summary Implements IpExtendedCommunities list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipExtendedCommunities.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipExtendedCommunitiesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesListBySubscriptionSample.ts new file mode 100644 index 000000000000..24f117f8be7a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpExtendedCommunities list by subscription GET method. + * + * @summary Implements IpExtendedCommunities list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipExtendedCommunities.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipExtendedCommunitiesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesUpdateSample.ts new file mode 100644 index 000000000000..b58461159e42 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipExtendedCommunitiesUpdateSample.ts @@ -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 { + IpExtendedCommunityPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Extended Community resource. + * + * @summary API to update certain properties of the IP Extended Community resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json + */ +async function ipExtendedCommunitiesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgIpExtendedCommunityLists"; + const ipExtendedCommunityName = "example_ipExtendedCommunity"; + const body: IpExtendedCommunityPatch = { tags: { key5054: "key1" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipExtendedCommunities.beginUpdateAndWait( + resourceGroupName, + ipExtendedCommunityName, + body + ); + console.log(result); +} + +async function main() { + ipExtendedCommunitiesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesCreateSample.ts new file mode 100644 index 000000000000..6c35eb516a57 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesCreateSample.ts @@ -0,0 +1,63 @@ +/* + * 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 { + IpPrefix, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Prefix PUT method. + * + * @summary Implements IP Prefix PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Create_MaximumSet_Gen.json + */ +async function ipPrefixesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const body: IpPrefix = { + annotation: "annotationValue", + ipPrefixRules: [ + { + action: "Permit", + condition: "EqualTo", + networkPrefix: "1.1.1.0/24", + sequenceNumber: 12, + subnetMaskLength: 28 + } + ], + location: "EastUS", + tags: { key6404: "" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipPrefixes.beginCreateAndWait( + resourceGroupName, + ipPrefixName, + body + ); + console.log(result); +} + +async function main() { + ipPrefixesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesDeleteSample.ts new file mode 100644 index 000000000000..b920867bcc34 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Prefix DELETE method. + * + * @summary Implements IP Prefix DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Delete_MaximumSet_Gen.json + */ +async function ipPrefixesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "xxxxxx"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgIpPrefixLists"; + const ipPrefixName = "example-ipPrefix"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipPrefixes.beginDeleteAndWait( + resourceGroupName, + ipPrefixName + ); + console.log(result); +} + +async function main() { + ipPrefixesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesGetSample.ts new file mode 100644 index 000000000000..647c9b3bb520 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesGetSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IP Prefix GET method. + * + * @summary Implements IP Prefix GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json + */ +async function ipPrefixesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "xxxxxx"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipPrefixes.get(resourceGroupName, ipPrefixName); + console.log(result); +} + +async function main() { + ipPrefixesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesListByResourceGroupSample.ts new file mode 100644 index 000000000000..92de13c651ff --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpPrefixes list by resource group GET method. + * + * @summary Implements IpPrefixes list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + */ +async function ipPrefixesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipPrefixes.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipPrefixesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesListBySubscriptionSample.ts new file mode 100644 index 000000000000..614836496a17 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements IpPrefixes list by subscription GET method. + * + * @summary Implements IpPrefixes list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json + */ +async function ipPrefixesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.ipPrefixes.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + ipPrefixesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesUpdateSample.ts new file mode 100644 index 000000000000..4e34173c6562 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/ipPrefixesUpdateSample.ts @@ -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 { + IpPrefixPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the IP Prefix resource. + * + * @summary API to update certain properties of the IP Prefix resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Update_MaximumSet_Gen.json + */ +async function ipPrefixesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourcegroupname"; + const ipPrefixName = "example-ipPrefix"; + const body: IpPrefixPatch = { tags: { key3127: "key" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.ipPrefixes.beginUpdateAndWait( + resourceGroupName, + ipPrefixName, + body + ); + console.log(result); +} + +async function main() { + ipPrefixesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsClearArpTableSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsClearArpTableSample.ts new file mode 100644 index 000000000000..7dc3813e82e0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsClearArpTableSample.ts @@ -0,0 +1,54 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears ARP tables for this Isolation Domain. + * + * @summary Clears ARP tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearArpTable_MaximumSet_Gen.json + */ +async function l2IsolationDomainsClearArpTableMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginClearArpTableAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsClearArpTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsClearNeighborTableSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsClearNeighborTableSample.ts new file mode 100644 index 000000000000..1f3ea54ecccd --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsClearNeighborTableSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbors for this Isolation Domain. + * + * @summary Clears IPv6 neighbors for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearNeighborTable_MaximumSet_Gen.json + */ +async function l2IsolationDomainsClearNeighborTableMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "qc"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || + "rgL2IsolationDomains"; + const l2IsolationDomainName = "oz"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginClearNeighborTableAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsClearNeighborTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsCreateSample.ts new file mode 100644 index 000000000000..ffa7fe370a1f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsCreateSample.ts @@ -0,0 +1,56 @@ +/* + * 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 { + L2IsolationDomain, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. + * + * @summary Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Create_MaximumSet_Gen.json + */ +async function l2IsolationDomainsCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const body: L2IsolationDomain = { + location: "eastus", + mtu: 1500, + networkFabricId: + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName", + vlanId: 501 + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginCreateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsDeleteSample.ts new file mode 100644 index 000000000000..4d5ee372b0f7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * + * @summary Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json + */ +async function l2IsolationDomainsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "example-l2domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginDeleteAndWait( + resourceGroupName, + l2IsolationDomainName + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsGetArpEntriesSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsGetArpEntriesSample.ts new file mode 100644 index 000000000000..fecbdb499804 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsGetArpEntriesSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbors for this Isolation Domain. + * + * @summary Clears IPv6 neighbors for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_getArpEntries_MaximumSet_Gen.json + */ +async function l2IsolationDomainsGetArpEntriesMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginGetArpEntriesAndWait( + resourceGroupName, + l2IsolationDomainName + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsGetArpEntriesMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsGetSample.ts new file mode 100644 index 000000000000..6a8a44ad6055 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements L2 Isolation Domain GET method. + * + * @summary Implements L2 Isolation Domain GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json + */ +async function l2IsolationDomainsGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.get( + resourceGroupName, + l2IsolationDomainName + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsListByResourceGroupSample.ts new file mode 100644 index 000000000000..108240b275b1 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays L2IsolationDomains list by resource group GET method. + * + * @summary Displays L2IsolationDomains list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + */ +async function l2IsolationDomainsListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.l2IsolationDomains.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l2IsolationDomainsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsListBySubscriptionSample.ts new file mode 100644 index 000000000000..97e959bfcc47 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays L2IsolationDomains list by subscription GET method. + * + * @summary Displays L2IsolationDomains list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + */ +async function l2IsolationDomainsListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.l2IsolationDomains.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l2IsolationDomainsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..00a246f2c8e6 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsUpdateAdministrativeStateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Enables isolation domain across the fabric or on specified racks. + * + * @summary Enables isolation domain across the fabric or on specified racks. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + */ +async function l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsUpdateSample.ts new file mode 100644 index 000000000000..5adc88236519 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l2IsolationDomainsUpdateSample.ts @@ -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 { + L2IsolationDomainPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the L2 Isolation Domain resource. + * + * @summary API to update certain properties of the L2 Isolation Domain resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Update_MaximumSet_Gen.json + */ +async function l2IsolationDomainsUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l2IsolationDomainName = "l2IsolationDomainName"; + const body: L2IsolationDomainPatch = { mtu: 9000 }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l2IsolationDomains.beginUpdateAndWait( + resourceGroupName, + l2IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l2IsolationDomainsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsClearArpTableSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsClearArpTableSample.ts new file mode 100644 index 000000000000..23f87ed4bd05 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsClearArpTableSample.ts @@ -0,0 +1,54 @@ +/* + * 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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears ARP tables for this Isolation Domain. + * + * @summary Clears ARP tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearArpTable_MaximumSet_Gen.json + */ +async function l3IsolationDomainsClearArpTableMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "l3IsolationDomainName"; + const body: EnableDisableOnResources = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginClearArpTableAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsClearArpTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsClearNeighborTableSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsClearNeighborTableSample.ts new file mode 100644 index 000000000000..f39c5f712094 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsClearNeighborTableSample.ts @@ -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 { + EnableDisableOnResources, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Clears IPv6 neighbor tables for this Isolation Domain. + * + * @summary Clears IPv6 neighbor tables for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearNeighborTable_MaximumSet_Gen.json + */ +async function l3IsolationDomainsClearNeighborTableMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: EnableDisableOnResources = { resourceIds: ["wnaxqikneofcni"] }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginClearNeighborTableAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsClearNeighborTableMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsCreateSample.ts new file mode 100644 index 000000000000..84d68e5803f3 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsCreateSample.ts @@ -0,0 +1,65 @@ +/* + * 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 { + L3IsolationDomain, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. + * + * @summary Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Create_MaximumSet_Gen.json + */ +async function l3IsolationDomainsCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: L3IsolationDomain = { + description: "creating L3 isolation domain", + aggregateRouteConfiguration: { + ipv4Routes: [{ prefix: "10.0.0.0/24" }], + ipv6Routes: [{ prefix: "10.0.0.1" }] + }, + connectedSubnetRoutePolicy: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2" + }, + location: "eastus", + networkFabricId: + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName", + redistributeConnectedSubnets: "True", + redistributeStaticRoutes: "False" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginCreateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsDeleteSample.ts new file mode 100644 index 000000000000..26f90f79b6a5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * + * @summary Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json + */ +async function l3IsolationDomainsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginDeleteAndWait( + resourceGroupName, + l3IsolationDomainName + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsGetSample.ts new file mode 100644 index 000000000000..ce8ec391cbf0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Retrieves details of this L3 Isolation Domain. + * + * @summary Retrieves details of this L3 Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + */ +async function l3IsolationDomainsGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.get( + resourceGroupName, + l3IsolationDomainName + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsListByResourceGroupSample.ts new file mode 100644 index 000000000000..1e0bdd0e1e86 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays L3IsolationDomains list by resource group GET method. + * + * @summary Displays L3IsolationDomains list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + */ +async function l3IsolationDomainsListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.l3IsolationDomains.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l3IsolationDomainsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsListBySubscriptionSample.ts new file mode 100644 index 000000000000..7304003d3201 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Displays L3IsolationDomains list by subscription GET method. + * + * @summary Displays L3IsolationDomains list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + */ +async function l3IsolationDomainsListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.l3IsolationDomains.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + l3IsolationDomainsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..6e39b07b73f4 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateAdministrativeStateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Enables racks for this Isolation Domain. + * + * @summary Enables racks for this Isolation Domain. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.ts new file mode 100644 index 000000000000..3801cebe9844 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateOptionBAdministrativeStateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update administrative state of option B on CE devices + * + * @summary Update administrative state of option B on CE devices + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: UpdateAdministrativeState = { + resourceIds: [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + state: "Enable" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginUpdateOptionBAdministrativeStateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateSample.ts new file mode 100644 index 000000000000..a682ef5a9759 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/l3IsolationDomainsUpdateSample.ts @@ -0,0 +1,62 @@ +/* + * 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 { + L3IsolationDomainPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the L3 Isolation Domain resource. + * + * @summary API to update certain properties of the L3 Isolation Domain resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Update_MaximumSet_Gen.json + */ +async function l3IsolationDomainsUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const l3IsolationDomainName = "example-l3domain"; + const body: L3IsolationDomainPatch = { + description: "creating L3 isolation domain", + aggregateRouteConfiguration: { + ipv4Routes: [{ prefix: "10.0.0.0/24" }], + ipv6Routes: [{ prefix: "3FFE:FFFF:0:CD30::a0/29" }] + }, + connectedSubnetRoutePolicy: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName" + }, + redistributeConnectedSubnets: "True", + redistributeStaticRoutes: "False" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.l3IsolationDomains.beginUpdateAndWait( + resourceGroupName, + l3IsolationDomainName, + body + ); + console.log(result); +} + +async function main() { + l3IsolationDomainsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDeviceSkusGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDeviceSkusGetSample.ts new file mode 100644 index 000000000000..25b10b369fa9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDeviceSkusGetSample.ts @@ -0,0 +1,40 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Network Device SKU details. + * + * @summary Get Network Device SKU details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + */ +async function networkDeviceSkusGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkDeviceSkuName = "DefaultSku"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDeviceSkus.get(networkDeviceSkuName); + console.log(result); +} + +async function main() { + networkDeviceSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDeviceSkusListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDeviceSkusListBySubscriptionSample.ts new file mode 100644 index 000000000000..140e43e72de8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDeviceSkusListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List Network Device SKUs for the given subscription. + * + * @summary List Network Device SKUs for the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkDeviceSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkDeviceSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDeviceSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesCreateSample.ts new file mode 100644 index 000000000000..1c1a46483c47 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesCreateSample.ts @@ -0,0 +1,58 @@ +/* + * 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 { + NetworkDevice, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create a Network Device resource + * + * @summary Create a Network Device resource + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Create_MaximumSet_Gen.json + */ +async function networkDevicesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body: NetworkDevice = { + annotation: "null", + hostName: "networkDeviceName", + location: "eastus", + networkDeviceRole: "CE", + networkDeviceSku: "DefaultSku", + serialNumber: "Arista;DCS-7280PR3-24;12.05;JPE21330382", + tags: { keyID: "keyValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginCreateAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesDeleteSample.ts new file mode 100644 index 000000000000..62efb789906b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete the Network Device resource. + * + * @summary Delete the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Delete_MaximumSet_Gen.json + */ +async function networkDevicesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginDeleteAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGenerateSupportPackageSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGenerateSupportPackageSample.ts new file mode 100644 index 000000000000..e76e0dfa7459 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGenerateSupportPackageSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Generate Support Package for the given Network Device. + * + * @summary Generate Support Package for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_generateSupportPackage_MaximumSet_Gen.json + */ +async function networkDevicesGenerateSupportPackageMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginGenerateSupportPackageAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGenerateSupportPackageMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetDynamicInterfaceMapsSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetDynamicInterfaceMapsSample.ts new file mode 100644 index 000000000000..2a76f7c3204c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetDynamicInterfaceMapsSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the dynamic interface maps for the given Network Device. + * + * @summary Get the dynamic interface maps for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen.json + */ +async function networkDevicesGetDynamicInterfaceMapsMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginGetDynamicInterfaceMapsAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetDynamicInterfaceMapsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetSample.ts new file mode 100644 index 000000000000..dc1170afb494 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the Network Device resource details. + * + * @summary Get the Network Device resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json + */ +async function networkDevicesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.get( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetStaticInterfaceMapsSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetStaticInterfaceMapsSample.ts new file mode 100644 index 000000000000..a5582f67c05b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetStaticInterfaceMapsSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the static interface maps for the given Network Device. + * + * @summary Get the static interface maps for the given Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen.json + */ +async function networkDevicesGetStaticInterfaceMapsMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginGetStaticInterfaceMapsAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetStaticInterfaceMapsMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetStatusSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetStatusSample.ts new file mode 100644 index 000000000000..2b9586a0f071 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesGetStatusSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the running status of the Network Device. + * + * @summary Get the running status of the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStatus_MaximumSet_Gen.json + */ +async function networkDevicesGetStatusMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginGetStatusAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesGetStatusMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesListByResourceGroupSample.ts new file mode 100644 index 000000000000..45ba84d455dd --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Device resources in a given resource group. + * + * @summary List all the Network Device resources in a given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkDevicesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkDevices.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDevicesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesListBySubscriptionSample.ts new file mode 100644 index 000000000000..5aee48d0d618 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Device resources in a given subscription. + * + * @summary List all the Network Device resources in a given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json + */ +async function networkDevicesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkDevices.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkDevicesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesRebootSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesRebootSample.ts new file mode 100644 index 000000000000..f03d5ed5c44a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesRebootSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Reboot the Network Device. + * + * @summary Reboot the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_reboot_MaximumSet_Gen.json + */ +async function networkDevicesRebootMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginRebootAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesRebootMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesRestoreConfigSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesRestoreConfigSample.ts new file mode 100644 index 000000000000..b65594f0d68f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesRestoreConfigSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Restore the configuration of the Network Device resource to last known good configuration. + * + * @summary Restore the configuration of the Network Device resource to last known good configuration. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_restoreConfig_MaximumSet_Gen.json + */ +async function networkDevicesRestoreConfigMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginRestoreConfigAndWait( + resourceGroupName, + networkDeviceName + ); + console.log(result); +} + +async function main() { + networkDevicesRestoreConfigMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdatePowerCycleSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdatePowerCycleSample.ts new file mode 100644 index 000000000000..c3cb74f71d2f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdatePowerCycleSample.ts @@ -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 { + UpdatePowerCycleProperties, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update PDU power cycle of the Network Device. + * + * @summary Update PDU power cycle of the Network Device. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updatePowerCycle_MaximumSet_Gen.json + */ +async function networkDevicesUpdatePowerCycleMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body: UpdatePowerCycleProperties = { powerEnd: "Primary", state: "On" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginUpdatePowerCycleAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdatePowerCycleMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdateSample.ts new file mode 100644 index 000000000000..a72ab248d10b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdateSample.ts @@ -0,0 +1,55 @@ +/* + * 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 { + NetworkDevicePatchParameters, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Device resource. + * + * @summary Update certain properties of the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Update_MaximumSet_Gen.json + */ +async function networkDevicesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body: NetworkDevicePatchParameters = { + annotation: "null", + hostName: "networkDeviceName", + serialNumber: "Arista;DCS-7280PR3-24;12.05;JPE21330382", + tags: { keyID: "keyValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginUpdateAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdateVersionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdateVersionSample.ts new file mode 100644 index 000000000000..06faf9d36499 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkDevicesUpdateVersionSample.ts @@ -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 { + UpdateVersionProperties, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the SKU version of the Network Device resource. + * + * @summary Update the SKU version of the Network Device resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updateVersion_MaximumSet_Gen.json + */ +async function networkDevicesUpdateVersionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const body: UpdateVersionProperties = { skuVersion: "DefaultSku" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkDevices.beginUpdateVersionAndWait( + resourceGroupName, + networkDeviceName, + body + ); + console.log(result); +} + +async function main() { + networkDevicesUpdateVersionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersCreateSample.ts new file mode 100644 index 000000000000..fbd02b7fe637 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersCreateSample.ts @@ -0,0 +1,72 @@ +/* + * 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 { + NetworkFabricController, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates a Network Fabric Controller. + * + * @summary Creates a Network Fabric Controller. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json + */ +async function networkFabricControllersCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "NetworkControllerName"; + const body: NetworkFabricController = { + annotation: "lab 1", + infrastructureExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName" + } + ], + ipv4AddressSpace: "172.253.0.0/19", + location: "eastus", + managedResourceGroupConfiguration: { + name: "managedResourceGroupName", + location: "eastus" + }, + workloadExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName" + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginCreateAndWait( + resourceGroupName, + networkFabricControllerName, + body + ); + console.log(result); +} + +async function main() { + networkFabricControllersCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersDeleteSample.ts new file mode 100644 index 000000000000..cbb7f32f80e8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deletes the Network Fabric Controller resource. + * + * @summary Deletes the Network Fabric Controller resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json + */ +async function networkFabricControllersDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginDeleteAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersDisableWorkloadManagementNetworkSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersDisableWorkloadManagementNetworkSample.ts new file mode 100644 index 000000000000..c6743825f461 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersDisableWorkloadManagementNetworkSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Disables the workloadManagementNetwork (Tenant Network). + * + * @summary Disables the workloadManagementNetwork (Tenant Network). + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen.json + */ +async function networkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginDisableWorkloadManagementNetworkAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersEnableWorkloadManagementNetworkSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersEnableWorkloadManagementNetworkSample.ts new file mode 100644 index 000000000000..f287132da901 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersEnableWorkloadManagementNetworkSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Enables the workloadManagementNetwork (Tenant Network). + * + * @summary Enables the workloadManagementNetwork (Tenant Network). + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen.json + */ +async function networkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginEnableWorkloadManagementNetworkAndWait( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersGetSample.ts new file mode 100644 index 000000000000..2aca418a87e8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Shows the provisioning status of Network Fabric Controller. + * + * @summary Shows the provisioning status of Network Fabric Controller. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json + */ +async function networkFabricControllersGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.get( + resourceGroupName, + networkFabricControllerName + ); + console.log(result); +} + +async function main() { + networkFabricControllersGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersListByResourceGroupSample.ts new file mode 100644 index 000000000000..e58bad52e986 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists all the NetworkFabricControllers thats available in the resource group. + * + * @summary Lists all the NetworkFabricControllers thats available in the resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkFabricControllersListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabricControllers.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricControllersListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersListBySubscriptionSample.ts new file mode 100644 index 000000000000..145d5752dd62 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Lists all the NetworkFabricControllers by subscription. + * + * @summary Lists all the NetworkFabricControllers by subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricControllersListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabricControllers.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricControllersListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersUpdateSample.ts new file mode 100644 index 000000000000..c3c8074bc95a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricControllersUpdateSample.ts @@ -0,0 +1,58 @@ +/* + * 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 { + NetworkFabricControllerPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Updates are currently not supported for the Network Fabric Controller resource. + * + * @summary Updates are currently not supported for the Network Fabric Controller resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json + */ +async function networkFabricControllersUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricControllerName = "networkFabricControllerName"; + const body: NetworkFabricControllerPatch = { + workloadExpressRouteConnections: [ + { + expressRouteAuthorizationKey: "xxxxxxx", + expressRouteCircuitId: + "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName" + } + ] + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricControllers.beginUpdateAndWait( + resourceGroupName, + networkFabricControllerName, + body + ); + console.log(result); +} + +async function main() { + networkFabricControllersUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricSkusGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricSkusGetSample.ts new file mode 100644 index 000000000000..65fa3f6a3750 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricSkusGetSample.ts @@ -0,0 +1,40 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Network Fabric Sku GET method. + * + * @summary Implements Network Fabric Sku GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json + */ +async function networkFabricSkusGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkFabricSkuName = "networkFabricSkuName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabricSkus.get(networkFabricSkuName); + console.log(result); +} + +async function main() { + networkFabricSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricSkusListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricSkusListBySubscriptionSample.ts new file mode 100644 index 000000000000..18459d90185f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricSkusListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements NetworkFabricSkus list by subscription GET method. + * + * @summary Implements NetworkFabricSkus list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabricSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsCreateSample.ts new file mode 100644 index 000000000000..e9b8d01b90ec --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsCreateSample.ts @@ -0,0 +1,105 @@ +/* + * 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 { + NetworkFabric, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create Network Fabric resource. + * + * @summary Create Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Create_MaximumSet_Gen.json + */ +async function networkFabricsCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const body: NetworkFabric = { + annotation: "annotationValue", + fabricASN: 29249, + ipv4Prefix: "10.18.0.0/19", + ipv6Prefix: "3FFE:FFFF:0:CD40::/59", + location: "eastuseuap", + managementNetworkConfiguration: { + infrastructureVpnConfiguration: { + optionAProperties: { + mtu: 5892, + peerASN: 42666, + primaryIpv4Prefix: "20.0.0.12/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a8/126", + secondaryIpv4Prefix: "20.0.0.13/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::ac/126", + vlanId: 2724 + }, + optionBProperties: { + exportRouteTargets: ["65046:10039"], + importRouteTargets: ["65046:10039"] + }, + peeringOption: "OptionA" + }, + workloadVpnConfiguration: { + optionAProperties: { + mtu: 5892, + peerASN: 42666, + primaryIpv4Prefix: "10.0.0.14/30", + primaryIpv6Prefix: "2FFE:FFFF:0:CD30::a7/126", + secondaryIpv4Prefix: "10.0.0.15/30", + secondaryIpv6Prefix: "2FFE:FFFF:0:CD30::ac/126", + vlanId: 2724 + }, + optionBProperties: { + exportRouteTargets: ["65046:10050"], + importRouteTargets: ["65046:10050"] + }, + peeringOption: "OptionA" + } + }, + networkFabricControllerId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", + networkFabricSku: "M4-A400-A100-C16-aa", + rackCount: 4, + serverCountPerRack: 8, + tags: { key6468: "" }, + terminalServerConfiguration: { + password: "xxxx", + primaryIpv4Prefix: "20.0.0.12/30", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a8/126", + secondaryIpv4Prefix: "20.0.0.13/30", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::ac/126", + serialNumber: "123456", + username: "username" + } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginCreateAndWait( + resourceGroupName, + networkFabricName, + body + ); + console.log(result); +} + +async function main() { + networkFabricsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsDeleteSample.ts new file mode 100644 index 000000000000..4f9e42be2265 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsDeleteSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete Network Fabric resource. + * + * @summary Delete Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Delete_MaximumSet_Gen.json + */ +async function networkFabricsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || + "70A68989-24C0-4FA7-B1B2-8A2BB6D10CA8"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgNetworkFabrics"; + const networkFabricName = "lrhjxlxlhgvufessdcuetcwnto"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginDeleteAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsDeprovisionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsDeprovisionSample.ts new file mode 100644 index 000000000000..e42ed87e8c19 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsDeprovisionSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Deprovisions the underlying resources in the given Network Fabric instance. + * + * @summary Deprovisions the underlying resources in the given Network Fabric instance. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json + */ +async function networkFabricsDeprovisionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginDeprovisionAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsDeprovisionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsGetSample.ts new file mode 100644 index 000000000000..3031cb751985 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Network Fabric resource details. + * + * @summary Get Network Fabric resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json + */ +async function networkFabricsGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.get( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsListByResourceGroupSample.ts new file mode 100644 index 000000000000..ee5530943414 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Fabric resources in the given resource group. + * + * @summary List all the Network Fabric resources in the given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkFabricsListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgNetworkFabrics"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabrics.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricsListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsListBySubscriptionSample.ts new file mode 100644 index 000000000000..18e6f2db11ad --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Fabric resources in the given subscription. + * + * @summary List all the Network Fabric resources in the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + */ +async function networkFabricsListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkFabrics.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkFabricsListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsProvisionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsProvisionSample.ts new file mode 100644 index 000000000000..5c900ff0157c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsProvisionSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Provisions the underlying resources in the given Network Fabric instance. + * + * @summary Provisions the underlying resources in the given Network Fabric instance. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_provision_MaximumSet_Gen.json + */ +async function networkFabricsProvisionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginProvisionAndWait( + resourceGroupName, + networkFabricName + ); + console.log(result); +} + +async function main() { + networkFabricsProvisionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsUpdateSample.ts new file mode 100644 index 000000000000..ebfea338b5a5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkFabricsUpdateSample.ts @@ -0,0 +1,58 @@ +/* + * 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 { + NetworkFabricPatchParameters, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Fabric resource. + * + * @summary Update certain properties of the Network Fabric resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Update_MaximumSet_Gen.json + */ +async function networkFabricsUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const body: NetworkFabricPatchParameters = { + annotation: "annotationValue", + tags: { key1758: "" }, + terminalServerConfiguration: { + password: "xxxxxxx", + serialNumber: "234567", + username: "username" + } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkFabrics.beginUpdateAndWait( + resourceGroupName, + networkFabricName, + body + ); + console.log(result); +} + +async function main() { + networkFabricsUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesCreateSample.ts new file mode 100644 index 000000000000..c9ce80ab7fda --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesCreateSample.ts @@ -0,0 +1,52 @@ +/* + * 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 { + NetworkInterface, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create a Network Interface resource. + * + * @summary Create a Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Create_MaximumSet_Gen.json + */ +async function networkInterfacesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body: NetworkInterface = { annotation: "null" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginCreateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesDeleteSample.ts new file mode 100644 index 000000000000..9990c342c2b0 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete the Network Interface resource. + * + * @summary Delete the Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json + */ +async function networkInterfacesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginDeleteAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesGetSample.ts new file mode 100644 index 000000000000..8f4c3f0f03fb --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the Network Interface resource details. + * + * @summary Get the Network Interface resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json + */ +async function networkInterfacesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.get( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesGetStatusSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesGetStatusSample.ts new file mode 100644 index 000000000000..12852cb1c6dc --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesGetStatusSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get the running status of the Network Interface. + * + * @summary Get the running status of the Network Interface. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_getStatus_MaximumSet_Gen.json + */ +async function networkInterfacesGetStatusMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginGetStatusAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName + ); + console.log(result); +} + +async function main() { + networkInterfacesGetStatusMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesListSample.ts new file mode 100644 index 000000000000..68207a212135 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesListSample.ts @@ -0,0 +1,48 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all the Network Interface resources in a given resource group. + * + * @summary List all the Network Interface resources in a given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_List_MaximumSet_Gen.json + */ +async function networkInterfacesListMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkInterfaces.list( + resourceGroupName, + networkDeviceName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkInterfacesListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesUpdateAdministrativeStateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesUpdateAdministrativeStateSample.ts new file mode 100644 index 000000000000..edaff88d039e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesUpdateAdministrativeStateSample.ts @@ -0,0 +1,52 @@ +/* + * 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 { + UpdateAdministrativeState, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update the admin state of the Network Interface. + * + * @summary Update the admin state of the Network Interface. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen.json + */ +async function networkInterfacesUpdateAdministrativeStateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body: UpdateAdministrativeState = { state: "Enable" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginUpdateAdministrativeStateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesUpdateAdministrativeStateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesUpdateSample.ts new file mode 100644 index 000000000000..e68668d7cbf5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkInterfacesUpdateSample.ts @@ -0,0 +1,52 @@ +/* + * 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 { + NetworkInterfacePatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Interface resource. + * + * @summary Update certain properties of the Network Interface resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Update_MaximumSet_Gen.json + */ +async function networkInterfacesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkDeviceName = "networkDeviceName"; + const networkInterfaceName = "networkInterfaceName"; + const body: NetworkInterfacePatch = { annotation: "null" }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkInterfaces.beginUpdateAndWait( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body + ); + console.log(result); +} + +async function main() { + networkInterfacesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRackSkusGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRackSkusGetSample.ts new file mode 100644 index 000000000000..c661aff6cd5b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRackSkusGetSample.ts @@ -0,0 +1,40 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Network Rack SKU resource. + * + * @summary Get Network Rack SKU resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json + */ +async function networkRackSkusGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const networkRackSkuName = "networkRackSkuName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRackSkus.get(networkRackSkuName); + console.log(result); +} + +async function main() { + networkRackSkusGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRackSkusListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRackSkusListBySubscriptionSample.ts new file mode 100644 index 000000000000..a052058bf31c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRackSkusListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all Network Rack SKUs in the given subscription. + * + * @summary List all Network Rack SKUs in the given subscription. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_ListBySubscription_MaximumSet_Gen.json + */ +async function networkRackSkusListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkRackSkus.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRackSkusListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksCreateSample.ts new file mode 100644 index 000000000000..dbf16ef63503 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksCreateSample.ts @@ -0,0 +1,57 @@ +/* + * 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 { + NetworkRack, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Create Network Rack resource. + * + * @summary Create Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Create_MaximumSet_Gen.json + */ +async function networkRacksCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const body: NetworkRack = { + annotation: "null", + location: "eastus", + networkFabricId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/networkFabricName", + networkRackSku: "RackSKU", + tags: { keyID: "keyValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRacks.beginCreateAndWait( + resourceGroupName, + networkRackName, + body + ); + console.log(result); +} + +async function main() { + networkRacksCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksDeleteSample.ts new file mode 100644 index 000000000000..a88d75450d86 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Delete Network Rack resource. + * + * @summary Delete Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Delete_MaximumSet_Gen.json + */ +async function networkRacksDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRacks.beginDeleteAndWait( + resourceGroupName, + networkRackName + ); + console.log(result); +} + +async function main() { + networkRacksDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksGetSample.ts new file mode 100644 index 000000000000..795bfbb9246e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Get Network Rack resource details. + * + * @summary Get Network Rack resource details. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json + */ +async function networkRacksGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRacks.get( + resourceGroupName, + networkRackName + ); + console.log(result); +} + +async function main() { + networkRacksGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksListByResourceGroupSample.ts new file mode 100644 index 000000000000..baa6b16fa171 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all Network Rack resources in the given resource group. + * + * @summary List all Network Rack resources in the given resource group. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + */ +async function networkRacksListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkRacks.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRacksListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksListBySubscriptionSample.ts new file mode 100644 index 000000000000..998b451e0b86 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to List all Network Rack resources in the given subscription + * + * @summary List all Network Rack resources in the given subscription + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json + */ +async function networkRacksListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkRacks.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkRacksListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksUpdateSample.ts new file mode 100644 index 000000000000..4cfdc3dd4128 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkRacksUpdateSample.ts @@ -0,0 +1,53 @@ +/* + * 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 { + NetworkRackPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Update certain properties of the Network Rack resource. + * + * @summary Update certain properties of the Network Rack resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Update_MaximumSet_Gen.json + */ +async function networkRacksUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkRackName = "networkRackName"; + const body: NetworkRackPatch = { + properties: {}, + tags: { keyID: "keyValue" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkRacks.beginUpdateAndWait( + resourceGroupName, + networkRackName, + body + ); + console.log(result); +} + +async function main() { + networkRacksUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsCreateSample.ts new file mode 100644 index 000000000000..b88d188f253f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsCreateSample.ts @@ -0,0 +1,69 @@ +/* + * 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 { + NetworkToNetworkInterconnect, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Configuration used to setup CE-PE connectivity PUT Method. + * + * @summary Configuration used to setup CE-PE connectivity PUT Method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const body: NetworkToNetworkInterconnect = { + isManagementType: "True", + layer2Configuration: { mtu: 1500, portCount: 10 }, + layer3Configuration: { + exportRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + importRoutePolicyId: + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", + peerASN: 50272, + primaryIpv4Prefix: "172.31.0.0/31", + primaryIpv6Prefix: "3FFE:FFFF:0:CD30::a0/126", + secondaryIpv4Prefix: "172.31.0.20/31", + secondaryIpv6Prefix: "3FFE:FFFF:0:CD30::a4/126", + vlanId: 2064 + }, + nniType: "CE", + useOptionB: "False" + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkToNetworkInterconnects.beginCreateAndWait( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName, + body + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsDeleteSample.ts new file mode 100644 index 000000000000..32bb44eb2ec7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsDeleteSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements NetworkToNetworkInterconnects DELETE method. + * + * @summary Implements NetworkToNetworkInterconnects DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkToNetworkInterconnects.beginDeleteAndWait( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsGetSample.ts new file mode 100644 index 000000000000..489bcd62245b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsGetSample.ts @@ -0,0 +1,47 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements NetworkToNetworkInterconnects GET method. + * + * @summary Implements NetworkToNetworkInterconnects GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const networkToNetworkInterconnectName = "DefaultNNI"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.networkToNetworkInterconnects.get( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName + ); + console.log(result); +} + +async function main() { + networkToNetworkInterconnectsGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsListSample.ts new file mode 100644 index 000000000000..6970ac8dfe69 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/networkToNetworkInterconnectsListSample.ts @@ -0,0 +1,48 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @summary Implements Network To Network Interconnects list by Network Fabric GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_List_MaximumSet_Gen.json + */ +async function networkToNetworkInterconnectsListMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const networkFabricName = "FabricName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.networkToNetworkInterconnects.list( + resourceGroupName, + networkFabricName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + networkToNetworkInterconnectsListMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/operationsListSample.ts new file mode 100644 index 000000000000..f6b3764b97f8 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/operationsListSample.ts @@ -0,0 +1,43 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Returns list of all operations. + * + * @summary Returns list of all operations. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ListOperations.json + */ +async function listOperations() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + listOperations(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesCreateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesCreateSample.ts new file mode 100644 index 000000000000..3393ce09aef1 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesCreateSample.ts @@ -0,0 +1,108 @@ +/* + * 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 { + RoutePolicy, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Route Policy PUT method. + * + * @summary Implements Route Policy PUT method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Create_MaximumSet_Gen.json + */ +async function routePoliciesCreateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const body: RoutePolicy = { + annotation: "annotationValue", + location: "EastUS", + statements: [ + { + action: { + actionType: "Permit", + ipCommunityProperties: { + add: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" + ] + }, + delete: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" + ] + }, + set: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" + ] + } + }, + ipExtendedCommunityProperties: { + add: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" + ] + }, + delete: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" + ] + }, + set: { + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" + ] + } + }, + localPreference: 20 + }, + annotation: "annotationValue", + condition: { + ipCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" + ], + ipExtendedCommunityIds: [ + "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" + ], + ipPrefixId: + "subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix" + }, + sequenceNumber: 7 + } + ], + tags: { key8254: "" } + }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.routePolicies.beginCreateAndWait( + resourceGroupName, + routePolicyName, + body + ); + console.log(result); +} + +async function main() { + routePoliciesCreateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesDeleteSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesDeleteSample.ts new file mode 100644 index 000000000000..b137e7cafa34 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesDeleteSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Route Policy DELETE method. + * + * @summary Implements Route Policy DELETE method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Delete_MaximumSet_Gen.json + */ +async function routePoliciesDeleteMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.routePolicies.beginDeleteAndWait( + resourceGroupName, + routePolicyName + ); + console.log(result); +} + +async function main() { + routePoliciesDeleteMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesGetSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesGetSample.ts new file mode 100644 index 000000000000..ddd2ae32a9f1 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesGetSample.ts @@ -0,0 +1,45 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements Route Policy GET method. + * + * @summary Implements Route Policy GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json + */ +async function routePoliciesGetMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const routePolicyName = "routePolicyName"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.routePolicies.get( + resourceGroupName, + routePolicyName + ); + console.log(result); +} + +async function main() { + routePoliciesGetMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesListByResourceGroupSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesListByResourceGroupSample.ts new file mode 100644 index 000000000000..3525f595b349 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesListByResourceGroupSample.ts @@ -0,0 +1,46 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements RoutePolicies list by resource group GET method. + * + * @summary Implements RoutePolicies list by resource group GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + */ +async function routePoliciesListByResourceGroupMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "rgRoutePolicies"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.routePolicies.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + routePoliciesListByResourceGroupMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesListBySubscriptionSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesListBySubscriptionSample.ts new file mode 100644 index 000000000000..9ad44f193676 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesListBySubscriptionSample.ts @@ -0,0 +1,42 @@ +/* + * 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 { AzureNetworkFabricManagementServiceAPI } from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Implements RoutePolicies list by subscription GET method. + * + * @summary Implements RoutePolicies list by subscription GET method. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json + */ +async function routePoliciesListBySubscriptionMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || "subscriptionId"; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.routePolicies.listBySubscription()) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + routePoliciesListBySubscriptionMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesUpdateSample.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesUpdateSample.ts new file mode 100644 index 000000000000..f6d665be7318 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/src/routePoliciesUpdateSample.ts @@ -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 { + RoutePolicyPatch, + AzureNetworkFabricManagementServiceAPI +} from "@azure/arm-managednetworkfabric"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to API to update certain properties of the Route Policy resource. + * + * @summary API to update certain properties of the Route Policy resource. + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Update_MaximumSet_Gen.json + */ +async function routePoliciesUpdateMaximumSetGen() { + const subscriptionId = + process.env["MANAGEDNETWORKFABRIC_SUBSCRIPTION_ID"] || + "97D66995-95BA-464A-A250-FB6E25E499A8"; + const resourceGroupName = + process.env["MANAGEDNETWORKFABRIC_RESOURCE_GROUP"] || "resourceGroupName"; + const routePolicyName = "routePolicyName"; + const body: RoutePolicyPatch = { tags: { key8254: "" } }; + const credential = new DefaultAzureCredential(); + const client = new AzureNetworkFabricManagementServiceAPI( + credential, + subscriptionId + ); + const result = await client.routePolicies.beginUpdateAndWait( + resourceGroupName, + routePolicyName, + body + ); + console.log(result); +} + +async function main() { + routePoliciesUpdateMaximumSetGen(); +} + +main().catch(console.error); diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/tsconfig.json b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/tsconfig.json new file mode 100644 index 000000000000..e26ce2a6d8f7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/samples/v1-beta/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**.ts" + ] +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/azureNetworkFabricManagementServiceAPI.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/azureNetworkFabricManagementServiceAPI.ts new file mode 100644 index 000000000000..b292ae64b7eb --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/azureNetworkFabricManagementServiceAPI.ts @@ -0,0 +1,218 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; +import * as coreAuth from "@azure/core-auth"; +import { + AccessControlListsImpl, + IpCommunitiesImpl, + IpExtendedCommunitiesImpl, + IpPrefixesImpl, + L2IsolationDomainsImpl, + L3IsolationDomainsImpl, + InternalNetworksImpl, + ExternalNetworksImpl, + NetworkDeviceSkusImpl, + NetworkDevicesImpl, + NetworkInterfacesImpl, + NetworkFabricControllersImpl, + NetworkFabricSkusImpl, + NetworkFabricsImpl, + NetworkToNetworkInterconnectsImpl, + NetworkRackSkusImpl, + NetworkRacksImpl, + OperationsImpl, + RoutePoliciesImpl +} from "./operations"; +import { + AccessControlLists, + IpCommunities, + IpExtendedCommunities, + IpPrefixes, + L2IsolationDomains, + L3IsolationDomains, + InternalNetworks, + ExternalNetworks, + NetworkDeviceSkus, + NetworkDevices, + NetworkInterfaces, + NetworkFabricControllers, + NetworkFabricSkus, + NetworkFabrics, + NetworkToNetworkInterconnects, + NetworkRackSkus, + NetworkRacks, + Operations, + RoutePolicies +} from "./operationsInterfaces"; +import { AzureNetworkFabricManagementServiceAPIOptionalParams } from "./models"; + +export class AzureNetworkFabricManagementServiceAPI extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; + apiVersion: string; + + /** + * Initializes a new instance of the AzureNetworkFabricManagementServiceAPI class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: AzureNetworkFabricManagementServiceAPIOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: AzureNetworkFabricManagementServiceAPIOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-managednetworkfabric/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); + + let bearerTokenAuthenticationPolicyFound: boolean = false; + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2023-02-01-preview"; + this.accessControlLists = new AccessControlListsImpl(this); + this.ipCommunities = new IpCommunitiesImpl(this); + this.ipExtendedCommunities = new IpExtendedCommunitiesImpl(this); + this.ipPrefixes = new IpPrefixesImpl(this); + this.l2IsolationDomains = new L2IsolationDomainsImpl(this); + this.l3IsolationDomains = new L3IsolationDomainsImpl(this); + this.internalNetworks = new InternalNetworksImpl(this); + this.externalNetworks = new ExternalNetworksImpl(this); + this.networkDeviceSkus = new NetworkDeviceSkusImpl(this); + this.networkDevices = new NetworkDevicesImpl(this); + this.networkInterfaces = new NetworkInterfacesImpl(this); + this.networkFabricControllers = new NetworkFabricControllersImpl(this); + this.networkFabricSkus = new NetworkFabricSkusImpl(this); + this.networkFabrics = new NetworkFabricsImpl(this); + this.networkToNetworkInterconnects = new NetworkToNetworkInterconnectsImpl( + this + ); + this.networkRackSkus = new NetworkRackSkusImpl(this); + this.networkRacks = new NetworkRacksImpl(this); + this.operations = new OperationsImpl(this); + this.routePolicies = new RoutePoliciesImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + accessControlLists: AccessControlLists; + ipCommunities: IpCommunities; + ipExtendedCommunities: IpExtendedCommunities; + ipPrefixes: IpPrefixes; + l2IsolationDomains: L2IsolationDomains; + l3IsolationDomains: L3IsolationDomains; + internalNetworks: InternalNetworks; + externalNetworks: ExternalNetworks; + networkDeviceSkus: NetworkDeviceSkus; + networkDevices: NetworkDevices; + networkInterfaces: NetworkInterfaces; + networkFabricControllers: NetworkFabricControllers; + networkFabricSkus: NetworkFabricSkus; + networkFabrics: NetworkFabrics; + networkToNetworkInterconnects: NetworkToNetworkInterconnects; + networkRackSkus: NetworkRackSkus; + networkRacks: NetworkRacks; + operations: Operations; + routePolicies: RoutePolicies; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/index.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/index.ts new file mode 100644 index 000000000000..19acbd7ee0d2 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export { getContinuationToken } from "./pagingHelper"; +export * from "./models"; +export { AzureNetworkFabricManagementServiceAPI } from "./azureNetworkFabricManagementServiceAPI"; +export * from "./operationsInterfaces"; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/lroImpl.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/lroImpl.ts new file mode 100644 index 000000000000..dd803cd5e28c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/lroImpl.ts @@ -0,0 +1,42 @@ +/* + * 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 { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/index.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/index.ts new file mode 100644 index 000000000000..a5417afea398 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/index.ts @@ -0,0 +1,4507 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +/** Switch configuration entries require a description to discern between configuration groups. */ +export interface AnnotationResource { + /** Switch configuration description. */ + annotation?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** The AccessControlList patch resource definition. */ +export interface AccessControlListPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** Switch configuration description. */ + annotation?: string; + /** IP address family. Example: ipv4 | ipv6. */ + addressFamily?: AddressFamily; + /** Access Control List conditions. */ + conditions?: AccessControlListConditionProperties[]; +} + +/** List of AccessControlLists. */ +export interface AccessControlListsListResult { + /** List of AccessControlList resources. */ + value?: AccessControlList[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** The IPCommunity patch resource definition. */ +export interface IpCommunityPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** List of IPCommunities. */ +export interface IpCommunitiesListResult { + /** List of IpCommunity resources. */ + value?: IpCommunity[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** The IpExtendedCommunities patch resource definition. */ +export interface IpExtendedCommunityPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** List of IpExtendedCommunities. */ +export interface IpExtendedCommunityListResult { + /** List of IpExtendedCommunities resources. */ + value?: IpExtendedCommunity[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +export interface IpPrefixPropertiesIpPrefixRulesItem { + /** Action to be taken on the configuration. Example: Permit | Deny. */ + action: CommunityActionTypes; + /** Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. */ + sequenceNumber: number; + /** Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. Example: 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126 */ + networkPrefix: string; + /** Specify prefix-list bounds. */ + condition?: Condition; + /** SubnetMaskLength gives the minimum NetworkPrefix length to be matched.Possible values for IPv4 are 1 - 32. Possible values of IPv6 are 1 - 128. */ + subnetMaskLength?: number; +} + +/** The IPPrefix patch resource definition. */ +export interface IpPrefixPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** List of IpPrefixes. */ +export interface IpPrefixesListResult { + /** List of IPPrefix resources. */ + value?: IpPrefix[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** The L2IsolationDomain patch resource definition. */ +export interface L2IsolationDomainPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** Switch configuration description. */ + annotation?: string; + /** maximum transmission unit. Default value is 1500. */ + mtu?: number; +} + +/** Update administrative state on list of resources. */ +export interface EnableDisableOnResources { + /** Network Fabrics or Network Rack resource Id. */ + resourceIds?: string[]; +} + +/** Show ARP table entry properties */ +export interface ARPProperties { + /** Ipv4 or Ipv6 address */ + address: string; + /** Duration in seconds. */ + age: string; + /** Hardware address. */ + macAddress: string; + /** Layer 2 interface name. */ + interface: string; + /** ARP status */ + state?: string; +} + +/** List of L2IsolationDomains. */ +export interface L2IsolationDomainsListResult { + /** Displays list of L2IsolationDomain resources. */ + value?: L2IsolationDomain[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** L3IsolationDomainPatchProperties define the patch resource properties. */ +export interface L3IsolationDomainPatchProperties { + /** Advertise Connected Subnets. Ex: "True" | "False". */ + redistributeConnectedSubnets?: RedistributeConnectedSubnets; + /** Advertise Static Routes. Ex: "True" | "False". */ + redistributeStaticRoutes?: RedistributeStaticRoutes; + /** List of Ipv4 and Ipv6 route configurations. */ + aggregateRouteConfiguration?: AggregateRouteConfiguration; + /** L3 Isolation Domain description. */ + description?: string; + /** Connected Subnet RoutePolicy */ + connectedSubnetRoutePolicy?: L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; +} + +/** List of IPv4 and IPv6 route configurations. */ +export interface AggregateRouteConfiguration { + /** List of IPv4 Route prefixes. */ + ipv4Routes?: AggregateRoute[]; + /** List of IPv6 Routes prefixes. */ + ipv6Routes?: AggregateRoute[]; +} + +/** Aggregate Route properties. */ +export interface AggregateRoute { + /** Prefix of the aggregate Route. */ + prefix?: string; +} + +/** Connected Subnet RoutePolicy */ +export interface L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy { + /** exportRoutePolicyId value. */ + exportRoutePolicyId?: string; + /** + * Enabled/Disabled connected subnet route policy. Ex: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; +} + +/** The L3IsolationDomain patch resource definition. */ +export interface L3IsolationDomainPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** Advertise Connected Subnets. Ex: "True" | "False". */ + redistributeConnectedSubnets?: RedistributeConnectedSubnets; + /** Advertise Static Routes. Ex: "True" | "False". */ + redistributeStaticRoutes?: RedistributeStaticRoutes; + /** List of Ipv4 and Ipv6 route configurations. */ + aggregateRouteConfiguration?: AggregateRouteConfiguration; + /** L3 Isolation Domain description. */ + description?: string; + /** Connected Subnet RoutePolicy */ + connectedSubnetRoutePolicy?: L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; +} + +/** List of L3IsolationDomains. */ +export interface L3IsolationDomainsListResult { + /** List of L3IsolationDomain resources. */ + value?: L3IsolationDomain[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** The ExternalNetwork patchable properties. */ +export interface InternalNetworkPatchableProperties { + /** Maximum transmission unit. Default value is 1500. */ + mtu?: number; + /** List with object connected IPv4 Subnets. */ + connectedIPv4Subnets?: ConnectedSubnet[]; + /** List with object connected IPv6 Subnets. */ + connectedIPv6Subnets?: ConnectedSubnet[]; + /** Static Route Configuration properties. */ + staticRouteConfiguration?: StaticRouteConfiguration; + /** BGP configuration properties */ + bgpConfiguration?: BgpConfiguration; + /** ARM resource ID of importRoutePolicy. */ + importRoutePolicyId?: string; + /** ARM resource ID of importRoutePolicy. */ + exportRoutePolicyId?: string; +} + +/** staticRouteConfiguration model. */ +export interface StaticRouteConfiguration { + /** BFD configuration properties */ + bfdConfiguration?: BfdConfiguration; + /** List with object IPv4Routes. */ + ipv4Routes?: StaticRouteProperties[]; + /** List with object IPv6Routes. */ + ipv6Routes?: StaticRouteProperties[]; +} + +/** BFD configuration properties */ +export interface BfdConfiguration { + /** + * Administrative state of the BfdConfiguration. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * interval in milliseconds. Example: 300. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly interval?: number; + /** + * Multiplier for the Bfd Configuration. Example: 3. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly multiplier?: number; +} + +/** Static Route properties. */ +export interface StaticRouteProperties { + /** IPv4 | IPv6 Prefix. */ + prefix: string; + /** List of next hop IPv4 | IPv6 addresses. */ + nextHop: string[]; +} + +/** Neighbor Address properties. */ +export interface NeighborAddress { + /** IP Address. */ + address?: string; + /** + * OperationalState of the NeighborAddress. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationalState?: string; +} + +/** The InternalNetwork patch resource definition. */ +export interface InternalNetworkPatch { + /** Switch configuration description. */ + annotation?: string; + /** Maximum transmission unit. Default value is 1500. */ + mtu?: number; + /** List with object connected IPv4 Subnets. */ + connectedIPv4Subnets?: ConnectedSubnet[]; + /** List with object connected IPv6 Subnets. */ + connectedIPv6Subnets?: ConnectedSubnet[]; + /** Static Route Configuration properties. */ + staticRouteConfiguration?: StaticRouteConfiguration; + /** BGP configuration properties */ + bgpConfiguration?: BgpConfiguration; + /** ARM resource ID of importRoutePolicy. */ + importRoutePolicyId?: string; + /** ARM resource ID of importRoutePolicy. */ + exportRoutePolicyId?: string; +} + +/** List of InternalNetworks. */ +export interface InternalNetworksList { + /** List of InternalNetworks resources. */ + value?: InternalNetwork[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** Option B configuration. */ +export interface OptionBProperties { + /** Route Targets to be applied for incoming routes into CE. */ + importRouteTargets?: string[]; + /** Route Targets to be applied for outgoing routes from CE. */ + exportRouteTargets?: string[]; +} + +/** Layer 3 primary and secondary ip address prefixes. */ +export interface Layer3IpPrefixProperties { + /** IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. */ + primaryIpv4Prefix?: string; + /** IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. */ + primaryIpv6Prefix?: string; + /** Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. */ + secondaryIpv4Prefix?: string; + /** Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. */ + secondaryIpv6Prefix?: string; +} + +/** The ExternalNetwork patch resource definition. */ +export interface ExternalNetworkPatch { + /** Switch configuration description. */ + annotation?: string; + /** Peering option list. */ + peeringOption?: PeeringOption; + /** option B properties object */ + optionBProperties?: OptionBProperties; + /** option A properties object */ + optionAProperties?: Layer3OptionAProperties; + /** ARM resource ID of importRoutePolicy. */ + importRoutePolicyId?: string; + /** ARM resource ID of exportRoutePolicy. */ + exportRoutePolicyId?: string; +} + +/** The ExternalNetwork patchable properties. */ +export interface ExternalNetworkPatchableProperties { + /** Peering option list. */ + peeringOption?: PeeringOption; + /** option B properties object */ + optionBProperties?: OptionBProperties; + /** option A properties object */ + optionAProperties?: Layer3OptionAProperties; + /** ARM resource ID of importRoutePolicy. */ + importRoutePolicyId?: string; + /** ARM resource ID of exportRoutePolicy. */ + exportRoutePolicyId?: string; +} + +/** List of ExternalNetworks. */ +export interface ExternalNetworksList { + /** List of ExternalNetworks resources. */ + value?: ExternalNetwork[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** Network device supported version properties. */ +export interface SupportedVersionProperties { + /** Operating system and firmware combined versions. */ + version?: string; + /** Operating system version. */ + vendorOsVersion?: string; + /** Firmware version. */ + vendorFirmwareVersion?: string; + /** If the current version is in use. */ + isCurrent?: IsCurrentVersion; + /** If the current version is a test version. */ + isTest?: IsTestVersion; +} + +/** Network device limits. */ +export interface DeviceLimits { + /** Maximum number of physical interfaces. */ + physicalInterfaceCount?: number; + /** Maximum number of sub-interfaces. */ + maxSubInterfaces?: number; + /** Maximum number of tunnel interfaces. */ + maxTunnelInterfaces?: number; + /** Maximum number of virtual router functions. */ + maxVirtualRouterFunctions?: number; + /** Maximum number of Border Gateway Protocol (BGP) peers. */ + maxBorderGatewayProtocolPeers?: number; + /** Maximum number of Bidirectional Forwarding Detection (BFD) peers. */ + maxBidirectionalForwardingDetectionPeers?: number; +} + +/** Network device interface properties. */ +export interface DeviceInterfaceProperties { + /** Interface identifier. Example: HundredGigE0/0. */ + identifier?: string; + /** Interface type. */ + interfaceType?: string; + /** List of supported connector types. */ + supportedConnectorTypes?: SupportedConnectorProperties[]; +} + +/** Supported connector properties. */ +export interface SupportedConnectorProperties { + /** Connector type. Example: Optical. */ + connectorType?: string; + /** Maximum speed of the connector in Mbps. */ + maxSpeedInMbps?: number; +} + +/** List of NetworkDeviceSkus. */ +export interface NetworkDeviceSkusListResult { + /** List of NetworkDeviceSku resources. */ + value?: NetworkDeviceSku[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** Network Device updatable properties */ +export interface NetworkDevicePatchableProperties { + /** The host Name of the device. */ + hostName?: string; + /** serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969 */ + serialNumber?: string; +} + +/** The NetworkDevicePatchParameters resource definition. */ +export interface NetworkDevicePatchParameters { + /** Azure resource tags that will replace the existing ones. */ + tags?: { [propertyName: string]: string }; + /** Switch configuration description. */ + annotation?: string; + /** The host Name of the device. */ + hostName?: string; + /** serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969 */ + serialNumber?: string; +} + +/** List of NetworkDevices. */ +export interface NetworkDevicesListResult { + /** List of NetworkDevice resources. */ + value?: NetworkDevice[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** The NetworkInterfacePatch resource definition. */ +export interface NetworkInterfacePatch { + /** Switch configuration description. */ + annotation?: string; +} + +/** List of NetworkInterfaces. */ +export interface NetworkInterfacesList { + /** List of NetworkInterfaces resources. */ + value?: NetworkInterface[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** Generate support package post action properties. */ +export interface UpdateVersionProperties { + /** The supported version defined in network device SKU. */ + skuVersion: string; +} + +/** Generate support package post action properties. */ +export interface SupportPackageProperties { + /** The URL to fetch the generated support package from. */ + supportPackageURL: string; +} + +/** Update power cycle input properties. */ +export interface UpdatePowerCycleProperties { + /** Primary or Secondary power end. */ + powerEnd: PowerEnd; + /** On or Off toggle state. */ + state: State; +} + +/** Get Device status response properties. */ +export interface GetDeviceStatusProperties { + /** Primary or Secondary power end. */ + operationalStatus: OperationalStatus; + /** On or Off power cycle state. */ + powerCycleState: PowerCycleState; + /** The serial number of the device */ + serialNumber: string; +} + +/** Get Device static interface maps as per topology. */ +export interface GetStaticInterfaceMapsPropertiesItem { + /** The interface name. */ + name?: string; + /** The interface description. */ + description?: string; + /** The interface identifier. */ + identifier?: string; + /** The interface type. Example: Ethernet */ + interfaceType?: string; + /** The physical cable connector type. Example: Optical */ + connectorType?: string; + /** Connected to ARM resource or external interface */ + connectedTo?: string; + /** The interface speed. Example: 100 */ + speed?: number; + /** The port channel group id. */ + channelGroupId?: number; +} + +/** Interface running status properties */ +export interface InterfaceStatus { + /** + * The interface administrative state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** The interface operational status. */ + operationalStatus?: string; + /** The physical status. */ + phyStatus?: string; + /** The interface transceiver type. Example: up or down */ + transceiverStatus?: string; + /** Connected to ARM resource or external interface */ + connectedTo?: string; +} + +/** InfrastructureServices IP ranges. */ +export interface InfrastructureServices { + /** The IPv4 Address space is optional, if the value is not defined at the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional attribute. */ + ipv4AddressSpaces?: string[]; + /** The IPv6 is not supported right now. */ + ipv6AddressSpaces?: string[]; +} + +/** WorkloadServices IP ranges. */ +export interface WorkloadServices { + /** The IPv4 Address space is optional, if the value is defined at the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional attribute. */ + ipv4AddressSpaces?: string[]; + /** The IPv6 is not supported right now. */ + ipv6AddressSpaces?: string[]; +} + +/** Managed Resource Group configuration properties. */ +export interface ManagedResourceGroupConfiguration { + /** The NFC service will be hosted in a Managed resource group. */ + name?: string; + /** Managed resource group location. */ + location?: string; +} + +/** Network Fabric Controller updatable properties */ +export interface NetworkFabricControllerPatchableProperties { + /** As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) */ + infrastructureExpressRouteConnections?: ExpressRouteConnectionInformation[]; + /** As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is a Mandatory attribute). */ + workloadExpressRouteConnections?: ExpressRouteConnectionInformation[]; +} + +/** The ExpressRoute circuit ID and the Auth Key are required for you to successfully deploy NFC service. */ +export interface ExpressRouteConnectionInformation { + /** The express route circuit Azure resource ID, must be of type Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory attribute. */ + expressRouteCircuitId: string; + /** Authorization key for the circuit, must be of type Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute. */ + expressRouteAuthorizationKey: string; +} + +/** The NetworkFabricControllerPatch payload definition. */ +export interface NetworkFabricControllerPatch { + /** Azure resource tags that will replace the existing ones. */ + tags?: { [propertyName: string]: string }; + /** As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) */ + infrastructureExpressRouteConnections?: ExpressRouteConnectionInformation[]; + /** As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is a Mandatory attribute). */ + workloadExpressRouteConnections?: ExpressRouteConnectionInformation[]; +} + +/** List of NetworkFabricControllers. */ +export interface NetworkFabricControllersListResult { + /** List of NetworkFabricController resources. */ + value?: NetworkFabricController[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** List of NetworkFabricSkus. */ +export interface NetworkFabricSkusListResult { + /** List of NetworkFabricSku resources. */ + value?: NetworkFabricSku[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** Network and credential configuration currently applied on terminal server. */ +export interface TerminalServerPatchableProperties { + /** Username for the terminal server connection. */ + username?: string; + /** Password for the terminal server connection. */ + password?: string; + /** Serial Number of Terminal server. */ + serialNumber?: string; +} + +/** Configuration to be used to setup the management network. */ +export interface ManagementNetworkConfiguration { + /** Configuration for infrastructure vpn. */ + infrastructureVpnConfiguration: VpnConfigurationProperties; + /** Configuration for workload vpn. */ + workloadVpnConfiguration: VpnConfigurationProperties; +} + +/** Configuration for infrastructure vpn. */ +export interface VpnConfigurationProperties { + /** + * Indicates configuration state. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * Gets the networkToNetworkInterconnectId of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkToNetworkInterconnectId?: string; + /** Peering option list. */ + peeringOption: PeeringOption; + /** option B properties */ + optionBProperties?: OptionBPropertiesAutoGenerated; + /** option A properties */ + optionAProperties?: OptionAProperties; +} + +/** Option B configuration. */ +export interface OptionBPropertiesAutoGenerated { + /** Route Targets to be applied for incoming routes into CE. */ + importRouteTargets: string[]; + /** Route Targets to be applied for outgoing routes from CE. */ + exportRouteTargets: string[]; +} + +/** BFD Configuration properties. */ +export interface FabricBfdConfiguration { + /** + * interval in seconds. Example: 300. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly interval?: number; + /** + * multiplier. Example: 3. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly multiplier?: number; +} + +/** Network Fabric updatable properties */ +export interface NetworkFabricPatchableProperties { + /** + * List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly racks?: string[]; + /** + * List of L2IsolationDomain resource IDs under the Network Fabric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly l2IsolationDomains?: string[]; + /** + * List of L3IsolationDomain resource IDs under the Network Fabric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly l3IsolationDomains?: string[]; +} + +/** The NetworkFabric resource definition. */ +export interface NetworkFabricPatchParameters { + /** Azure resource tags that will replace the existing ones. */ + tags?: { [propertyName: string]: string }; + /** Switch configuration description. */ + annotation?: string; + /** Network and credentials configuration already applied to terminal server. */ + terminalServerConfiguration?: TerminalServerPatchableProperties; + /** + * List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly racks?: string[]; + /** + * List of L2IsolationDomain resource IDs under the Network Fabric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly l2IsolationDomains?: string[]; + /** + * List of L3IsolationDomain resource IDs under the Network Fabric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly l3IsolationDomains?: string[]; +} + +/** Terminal server patch parameters */ +export interface TerminalServerPatchParameters { + /** Network and credentials configuration already applied to terminal server. */ + terminalServerConfiguration?: TerminalServerPatchableProperties; +} + +/** List of NetworkFabrics. */ +export interface NetworkFabricsListResult { + /** List of NetworkFabric resources. */ + value?: NetworkFabric[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** layer2Configuration */ +export interface Layer2Configuration { + /** Number of ports connected between PE/CE. Maximum value depends on FabricSKU. */ + portCount?: number; + /** MTU of the packets between PE & CE. */ + mtu: number; + /** + * List of network device interfaces resource IDs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly interfaces?: string[]; +} + +/** List of NetworkToNetworkInterconnects. */ +export interface NetworkToNetworkInterconnectsList { + /** List of NetworkToNetworkInterconnects resources. */ + value?: NetworkToNetworkInterconnect[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** Network device properties / role for the Network Rack. */ +export interface NetworkDeviceRoleProperties { + /** Name of the associated Network Device SKU. */ + networkDeviceSkuName?: string; + /** Role for the network device. */ + roleType?: NetworkDeviceRackRoleType; + /** Rack slot for the network device. */ + rackSlot?: number; +} + +/** List of NetworkRackSkus. */ +export interface NetworkRackSkusListResult { + /** List of NetworkRackSku resources. */ + value?: NetworkRackSku[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** The NetworkRack patch resource definition. */ +export interface NetworkRackPatch { + /** Resource properties. */ + properties?: Record; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** List of NetworkRacks. */ +export interface NetworkRacksListResult { + /** List of NetworkRack resources. */ + value?: NetworkRack[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** IP Community ID list properties. */ +export interface IpCommunityIdList { + /** List of IP Community resource IDs. */ + ipCommunityIds?: string[]; +} + +/** IP Extended Community Id list properties. */ +export interface IpExtendedCommunityIdList { + /** List of IP Extended Community resource IDs. */ + ipExtendedCommunityIds?: string[]; +} + +/** Route policy action properties. */ +export interface StatementActionProperties { + /** localPreference of the route policy. */ + localPreference?: number; + /** action. Example: Permit | Deny. */ + actionType: CommunityActionTypes; + /** IP Community Properties. */ + ipCommunityProperties?: ActionIpCommunityProperties; + /** IP Extended Community Properties. */ + ipExtendedCommunityProperties?: ActionIpExtendedCommunityProperties; +} + +/** IP Community add operation properties. */ +export interface IpCommunityAddOperationProperties { + /** IP Community ID list properties. */ + add?: IpCommunityIdList; +} + +/** IP Community delete operation properties. */ +export interface IpCommunityDeleteOperationProperties { + /** IP Community ID list properties. */ + delete?: IpCommunityIdList; +} + +/** IP Community set operation properties. */ +export interface IpCommunitySetOperationProperties { + /** IP Community ID list properties. */ + set?: IpCommunityIdList; +} + +/** IP Extended Community add operation properties. */ +export interface IpExtendedCommunityAddOperationProperties { + /** IP Extended Community Id list properties. */ + add?: IpExtendedCommunityIdList; +} + +/** IP Extended Community delete operation properties. */ +export interface IpExtendedCommunityDeleteOperationProperties { + /** IP Extended Community Id list properties. */ + delete?: IpExtendedCommunityIdList; +} + +/** IP Extended Community set operation properties. */ +export interface IpExtendedCommunitySetOperationProperties { + /** IP Extended Community Id list properties. */ + set?: IpExtendedCommunityIdList; +} + +/** The RoutePolicy patch resource definition. */ +export interface RoutePolicyPatch { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** List of RoutePolicies. */ +export interface RoutePoliciesListResult { + /** List of RoutePolicy resources. */ + value?: RoutePolicy[]; + /** Url to follow for getting next page of resources. */ + nextLink?: string; +} + +/** ExpressRouteStatus defines the resource properties. */ +export interface ExpressRouteStatusDef { + /** The express route circuit Azure resource ID, must be of type Microsoft.Network/expressRouteCircuits/circuitName. */ + expressRouteCircuitId?: string; + /** Express route connection state for the resource. */ + expressRouteStatus?: ExpressRouteConnectionState; +} + +/** The extended location. */ +export interface ExtendedLocation { + /** The extended location type. */ + type?: string; + /** The extended location name. */ + name?: string; +} + +/** Access Control List condition model. */ +export interface AccessControlListConditionProperties + extends AnnotationResource { + /** sequenceNumber of the Access Control List. */ + sequenceNumber: number; + /** action. Example: allow | deny. */ + action: ConditionActionType; + /** destinationAddress. Example: any | 1.1.1.0/24 | 1.1.10.10 */ + destinationAddress: string; + /** destinationPort. Example: any | 1253 */ + destinationPort: string; + /** sourceAddress. Example: any | 1.1.1.0/24 | 1.1.10.10 */ + sourceAddress: string; + /** sourcePort. Example: any | 1253 */ + sourcePort: string; + /** TCP/IP protocol as defined in the list of IP protocol numbers. Example: 255 (any) | 0 | 1. */ + protocol: number; +} + +/** AccessControlListProperties define the resource properties. */ +export interface AccessControlListProperties extends AnnotationResource { + /** IP address family. Example: ipv4 | ipv6. */ + addressFamily: AddressFamily; + /** Access Control List conditions. */ + conditions: AccessControlListConditionProperties[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** AccessControlListPatchProperties define the patchable resource properties. */ +export interface AccessControlListPatchProperties extends AnnotationResource { + /** IP address family. Example: ipv4 | ipv6. */ + addressFamily?: AddressFamily; + /** Access Control List conditions. */ + conditions?: AccessControlListConditionProperties[]; +} + +/** IpCommunityProperties define the resource properties. */ +export interface IpCommunityProperties extends AnnotationResource { + /** Action to be taken on the configuration. Example: Permit | Deny. */ + action: CommunityActionTypes; + /** Supported well known Community List. */ + wellKnownCommunities?: WellKnownCommunities[]; + /** List the communityMembers of IP Community . */ + communityMembers: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** IpExtendedCommunityProperties define the resource properties. */ +export interface IpExtendedCommunityProperties extends AnnotationResource { + /** Action to be taken on the configuration. Example: Permit | Deny. */ + action: CommunityActionTypes; + /** Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. */ + routeTargets: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** IpPrefixProperties define the resource properties. */ +export interface IpPrefixProperties extends AnnotationResource { + /** IpPrefix contains the list of IP PrefixRules objects. */ + ipPrefixRules: IpPrefixPropertiesIpPrefixRulesItem[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** L2IsolationDomainProperties define the resource properties. */ +export interface L2IsolationDomainProperties extends AnnotationResource { + /** Network Fabric ARM resource id. */ + networkFabricId: string; + /** vlanId. Example: 501. */ + vlanId: number; + /** maximum transmission unit. Default value is 1500. */ + mtu?: number; + /** + * List of resources the L2 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disabledOnResources?: string[]; + /** + * state. Example: Enabled | Disabled. It indicates administrative state of the isolationDomain, whether it is enabled or disabled. If enabled, the configuration is applied on the devices. If disabled, the configuration is removed from the devices + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** L2IsolationDomainPatchProperties define the patchable resource properties. */ +export interface L2IsolationDomainPatchProperties extends AnnotationResource { + /** maximum transmission unit. Default value is 1500. */ + mtu?: number; +} + +/** L3IsolationDomainProperties define the resource properties. */ +export interface L3IsolationDomainProperties + extends AnnotationResource, + L3IsolationDomainPatchProperties { + /** Network Fabric ARM resource id. */ + networkFabricId: string; + /** + * List of resources the L3 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disabledOnResources?: string[]; + /** + * Administrative state of the IsolationDomain. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * List of resources the OptionB is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly optionBDisabledOnResources?: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Connected Subnet properties. */ +export interface ConnectedSubnet extends AnnotationResource { + /** Prefix of the connected Subnet. */ + prefix?: string; +} + +/** BGP configuration properties */ +export interface BgpConfiguration extends AnnotationResource { + /** BFD configuration properties */ + bfdConfiguration?: BfdConfiguration; + /** Originate a defaultRoute. Ex: "True" | "False". */ + defaultRouteOriginate?: BooleanEnumProperty; + /** Allows for routes to be received and processed even if the router detects its own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. */ + allowAS?: number; + /** Enable Or Disable state. */ + allowASOverride?: AllowASOverride; + /** + * ASN of Network Fabric. Example: 65048. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricASN?: number; + /** Peer ASN. Example: 65047. */ + peerASN: number; + /** BGP Ipv4 ListenRange. */ + ipv4ListenRangePrefixes?: string[]; + /** BGP Ipv6 ListenRange. */ + ipv6ListenRangePrefixes?: string[]; + /** List with stringified ipv4NeighborAddresses. */ + ipv4NeighborAddress?: NeighborAddress[]; + /** List with stringified IPv6 Neighbor Address. */ + ipv6NeighborAddress?: NeighborAddress[]; +} + +/** Internal Network Properties */ +export interface InternalNetworkProperties + extends AnnotationResource, + InternalNetworkPatchableProperties { + /** + * List of resources the InternalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disabledOnResources?: string[]; + /** + * Administrative state of the InternalNetwork. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * List of resources the BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bgpDisabledOnResources?: string[]; + /** + * List of resources the BFD for BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bfdDisabledOnResources?: string[]; + /** + * List of resources the BFD of StaticRoutes is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bfdForStaticRoutesDisabledOnResources?: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Vlan identifier. Example: 1001. */ + vlanId: number; +} + +/** InternalNetwork Patch properties. */ +export interface InternalNetworkPatchProperties + extends AnnotationResource, + InternalNetworkPatchableProperties {} + +/** External Network Properties. */ +export interface ExternalNetworkProperties extends AnnotationResource { + /** + * Gets the networkToNetworkInterconnectId of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkToNetworkInterconnectId?: string; + /** + * List of resources the externalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disabledOnResources?: string[]; + /** + * AdministrativeState of the externalNetwork. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Peering option list. */ + peeringOption: PeeringOption; + /** option B properties object */ + optionBProperties?: OptionBProperties; + /** option A properties object */ + optionAProperties?: ExternalNetworkPropertiesOptionAProperties; + /** ARM resource ID of importRoutePolicy. */ + importRoutePolicyId?: string; + /** ARM resource ID of exportRoutePolicy. */ + exportRoutePolicyId?: string; +} + +/** External Network Patch properties. */ +export interface ExternalNetworkPatchProperties + extends AnnotationResource, + ExternalNetworkPatchableProperties {} + +/** NetworkDeviceProperties define the resource properties. */ +export interface NetworkDeviceProperties + extends AnnotationResource, + NetworkDevicePatchableProperties { + /** + * Current version of the device as defined in SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly version?: string; + /** Network Device SKU name. */ + networkDeviceSku: string; + /** networkDeviceRole is the device role: Example: CE | ToR. */ + networkDeviceRole: NetworkDeviceRoleTypes; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Reference to network rack resource id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkRackId?: string; +} + +/** Network Device Patch properties. */ +export interface NetworkDevicePatchParametersProperties + extends AnnotationResource, + NetworkDevicePatchableProperties {} + +/** NetworkInterfaceProperties define the resource properties. */ +export interface NetworkInterfaceProperties extends AnnotationResource { + /** + * physicalIdentifier of the network interface. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly physicalIdentifier?: string; + /** + * administrativeState of the network interface. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The arm resource id of the interface or compute server its connected to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectedTo?: string; + /** + * The Interface Type. Example: Management/Data + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly interfaceType?: InterfaceType; + /** + * ipv4Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipv4Address?: string; + /** + * ipv6Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipv6Address?: string; +} + +/** Network Interface Patch properties. */ +export interface NetworkInterfacePatchProperties extends AnnotationResource {} + +/** NetworkFabricControllerProperties define the resource properties. */ +export interface NetworkFabricControllerProperties + extends AnnotationResource, + NetworkFabricControllerPatchableProperties { + /** + * InfrastructureServices IP ranges. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly infrastructureServices?: InfrastructureServices; + /** + * WorkloadServices IP ranges. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workloadServices?: WorkloadServices; + /** Managed Resource Group configuration properties. */ + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + /** + * The NF-ID will be an input parameter used by the NF to link and get associated with the parent NFC Service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkFabricIds?: string[]; + /** + * A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workloadManagementNetwork?: boolean; + /** IPv4 Network Fabric Controller Address Space. */ + ipv4AddressSpace?: string; + /** IPv6 Network Fabric Controller Address Space. */ + ipv6AddressSpace?: string; + /** + * The Operational Status would always be NULL. Look only in to the Provisioning state for the latest status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationalState?: NetworkFabricControllerOperationalState; + /** + * Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC provisioning. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** NetworkFabricProperties - define the resource properties. */ +export interface NetworkFabricProperties + extends AnnotationResource, + NetworkFabricPatchableProperties { + /** Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack Network Fabric. */ + networkFabricSku: string; + /** Number of racks associated to Network Fabric.Possible values are from 2-8. */ + rackCount: number; + /** Number of servers.Possible values are from 1-16. */ + serverCountPerRack: number; + /** IPv4Prefix for Management Network. Example: 10.1.0.0/19. */ + ipv4Prefix?: string; + /** IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. */ + ipv6Prefix?: string; + /** + * Router Id of CE to be used for MP-BGP between PE and CE + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly routerId?: string; + /** ASN of CE devices for CE/PE connectivity. */ + fabricASN: number; + /** Azure resource ID for the NetworkFabricController the NetworkFabric belongs. */ + networkFabricControllerId: string; + /** Network and credentials configuration currently applied to terminal server. */ + terminalServerConfiguration: TerminalServerConfiguration; + /** Configuration to be used to setup the management network. */ + managementNetworkConfiguration: ManagementNetworkConfiguration; + /** + * Gets the operational state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationalState?: NetworkFabricOperationalState; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Network Fabric Patch properties. */ +export interface NetworkFabricPatchParametersProperties + extends AnnotationResource, + TerminalServerPatchParameters, + NetworkFabricPatchableProperties {} + +/** NetworkRackProperties define the resource properties. */ +export interface NetworkRackProperties extends AnnotationResource { + /** Network Rack SKU name. */ + networkRackSku: string; + /** Network Fabric ARM resource id. */ + networkFabricId: string; + /** + * List of network device ARM resource ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkDevices?: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Route Policy Statement properties.. */ +export interface RoutePolicyStatementProperties extends AnnotationResource { + /** Sequence to insert to/delete from existing route. */ + sequenceNumber: number; + /** Route policy condition properties. */ + condition: StatementConditionProperties; + /** Route policy action properties. */ + action: StatementActionProperties; +} + +/** RoutePolicy Properties define the resource properties. */ +export interface RoutePolicyProperties extends AnnotationResource { + /** Route Policy statements. */ + statements: RoutePolicyStatementProperties[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +/** Update administrative state on list of resources. */ +export interface UpdateAdministrativeState extends EnableDisableOnResources { + /** Administrative state. */ + state?: AdministrativeState; +} + +/** Peering optionA properties */ +export interface Layer3OptionAProperties extends Layer3IpPrefixProperties { + /** MTU to use for option A peering. */ + mtu?: number; + /** Vlan identifier. Example : 501 */ + vlanId?: number; + /** + * Fabric ASN number. Example 65001 + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricASN?: number; + /** Peer ASN number.Example : 28 */ + peerASN?: number; + /** BFD configuration properties */ + bfdConfiguration?: BfdConfiguration; +} + +/** Network and credentials configuration currently applied to terminal server. */ +export interface TerminalServerConfiguration + extends Layer3IpPrefixProperties, + TerminalServerPatchableProperties { + /** + * ARM Resource ID used for the NetworkDevice. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkDeviceId?: string; +} + +/** Peering optionA properties */ +export interface OptionAProperties extends Layer3IpPrefixProperties { + /** MTU to use for option A peering. */ + mtu?: number; + /** Vlan identifier. Example : 501 */ + vlanId?: number; + /** Peer ASN number.Example : 28 */ + peerASN?: number; + /** BFD Configuration properties. */ + bfdConfiguration?: FabricBfdConfiguration; +} + +/** layer3Configuration */ +export interface Layer3Configuration extends Layer3IpPrefixProperties { + /** importRoutePolicyId */ + importRoutePolicyId?: string; + /** exportRoutePolicyId */ + exportRoutePolicyId?: string; + /** ASN of PE devices for CE/PE connectivity.Example : 28 */ + peerASN?: number; + /** VLAN for CE/PE Layer 3 connectivity.Example : 501 */ + vlanId?: number; + /** + * ASN of CE devices for CE/PE connectivity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fabricASN?: number; +} + +/** Get Device static interface maps as per topology. */ +export interface GetDynamicInterfaceMapsPropertiesItem extends InterfaceStatus { + /** The interface name. */ + name?: string; +} + +/** Route policy statement condition properties. */ +export interface StatementConditionProperties + extends IpCommunityIdList, + IpExtendedCommunityIdList { + /** Arm Resource Id of IpPrefix. */ + ipPrefixId?: string; +} + +/** IP Community Properties. */ +export interface ActionIpCommunityProperties + extends IpCommunityAddOperationProperties, + IpCommunityDeleteOperationProperties, + IpCommunitySetOperationProperties {} + +/** IP Extended Community Properties. */ +export interface ActionIpExtendedCommunityProperties + extends IpExtendedCommunityAddOperationProperties, + IpExtendedCommunityDeleteOperationProperties, + IpExtendedCommunitySetOperationProperties {} + +/** The AccessControlList resource definition. */ +export interface AccessControlList extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** IP address family. Example: ipv4 | ipv6. */ + addressFamily: AddressFamily; + /** Access Control List conditions. */ + conditions: AccessControlListConditionProperties[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The IpCommunity resource definition. */ +export interface IpCommunity extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** Action to be taken on the configuration. Example: Permit | Deny. */ + action?: CommunityActionTypes; + /** Supported well known Community List. */ + wellKnownCommunities?: WellKnownCommunities[]; + /** List the communityMembers of IP Community . */ + communityMembers?: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The IpExtendedCommunity resource definition. */ +export interface IpExtendedCommunity extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** Action to be taken on the configuration. Example: Permit | Deny. */ + action?: CommunityActionTypes; + /** Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. */ + routeTargets?: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The IPPrefix resource definition. */ +export interface IpPrefix extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** IpPrefix contains the list of IP PrefixRules objects. */ + ipPrefixRules: IpPrefixPropertiesIpPrefixRulesItem[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The L2IsolationDomain resource definition. */ +export interface L2IsolationDomain extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** Network Fabric ARM resource id. */ + networkFabricId?: string; + /** vlanId. Example: 501. */ + vlanId?: number; + /** maximum transmission unit. Default value is 1500. */ + mtu?: number; + /** + * List of resources the L2 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disabledOnResources?: string[]; + /** + * state. Example: Enabled | Disabled. It indicates administrative state of the isolationDomain, whether it is enabled or disabled. If enabled, the configuration is applied on the devices. If disabled, the configuration is removed from the devices + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The L3IsolationDomain resource definition. */ +export interface L3IsolationDomain extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** Advertise Connected Subnets. Ex: "True" | "False". */ + redistributeConnectedSubnets?: RedistributeConnectedSubnets; + /** Advertise Static Routes. Ex: "True" | "False". */ + redistributeStaticRoutes?: RedistributeStaticRoutes; + /** List of Ipv4 and Ipv6 route configurations. */ + aggregateRouteConfiguration?: AggregateRouteConfiguration; + /** L3 Isolation Domain description. */ + description?: string; + /** Connected Subnet RoutePolicy */ + connectedSubnetRoutePolicy?: L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; + /** Network Fabric ARM resource id. */ + networkFabricId?: string; + /** + * List of resources the L3 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disabledOnResources?: string[]; + /** + * Administrative state of the IsolationDomain. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * List of resources the OptionB is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly optionBDisabledOnResources?: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The NetworkDevice resource definition. */ +export interface NetworkDevice extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** The host Name of the device. */ + hostName?: string; + /** serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969 */ + serialNumber?: string; + /** + * Current version of the device as defined in SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly version?: string; + /** Network Device SKU name. */ + networkDeviceSku?: string; + /** networkDeviceRole is the device role: Example: CE | ToR. */ + networkDeviceRole?: NetworkDeviceRoleTypes; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * Reference to network rack resource id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkRackId?: string; +} + +/** The NetworkFabricController resource definition. */ +export interface NetworkFabricController extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) */ + infrastructureExpressRouteConnections?: ExpressRouteConnectionInformation[]; + /** As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is a Mandatory attribute). */ + workloadExpressRouteConnections?: ExpressRouteConnectionInformation[]; + /** + * InfrastructureServices IP ranges. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly infrastructureServices?: InfrastructureServices; + /** + * WorkloadServices IP ranges. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workloadServices?: WorkloadServices; + /** Managed Resource Group configuration properties. */ + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + /** + * The NF-ID will be an input parameter used by the NF to link and get associated with the parent NFC Service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkFabricIds?: string[]; + /** + * A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workloadManagementNetwork?: boolean; + /** IPv4 Network Fabric Controller Address Space. */ + ipv4AddressSpace?: string; + /** IPv6 Network Fabric Controller Address Space. */ + ipv6AddressSpace?: string; + /** + * The Operational Status would always be NULL. Look only in to the Provisioning state for the latest status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationalState?: NetworkFabricControllerOperationalState; + /** + * Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC provisioning. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The NetworkFabric resource definition. */ +export interface NetworkFabric extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** + * List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly racks?: string[]; + /** + * List of L2IsolationDomain resource IDs under the Network Fabric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly l2IsolationDomains?: string[]; + /** + * List of L3IsolationDomain resource IDs under the Network Fabric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly l3IsolationDomains?: string[]; + /** Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack Network Fabric. */ + networkFabricSku?: string; + /** Number of racks associated to Network Fabric.Possible values are from 2-8. */ + rackCount?: number; + /** Number of servers.Possible values are from 1-16. */ + serverCountPerRack?: number; + /** IPv4Prefix for Management Network. Example: 10.1.0.0/19. */ + ipv4Prefix?: string; + /** IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. */ + ipv6Prefix?: string; + /** + * Router Id of CE to be used for MP-BGP between PE and CE + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly routerId?: string; + /** ASN of CE devices for CE/PE connectivity. */ + fabricASN?: number; + /** Azure resource ID for the NetworkFabricController the NetworkFabric belongs. */ + networkFabricControllerId?: string; + /** Network and credentials configuration currently applied to terminal server. */ + terminalServerConfiguration?: TerminalServerConfiguration; + /** Configuration to be used to setup the management network. */ + managementNetworkConfiguration?: ManagementNetworkConfiguration; + /** + * Gets the operational state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationalState?: NetworkFabricOperationalState; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The NetworkRack resource definition. */ +export interface NetworkRack extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** Network Rack SKU name. */ + networkRackSku: string; + /** Network Fabric ARM resource id. */ + networkFabricId: string; + /** + * List of network device ARM resource ids. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkDevices?: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The RoutePolicy resource definition. */ +export interface RoutePolicy extends TrackedResource { + /** Switch configuration description. */ + annotation?: string; + /** Route Policy statements. */ + statements: RoutePolicyStatementProperties[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Defines the InternalNetwork item. */ +export interface InternalNetwork extends ProxyResource { + /** Switch configuration description. */ + annotation?: string; + /** Maximum transmission unit. Default value is 1500. */ + mtu?: number; + /** List with object connected IPv4 Subnets. */ + connectedIPv4Subnets?: ConnectedSubnet[]; + /** List with object connected IPv6 Subnets. */ + connectedIPv6Subnets?: ConnectedSubnet[]; + /** Static Route Configuration properties. */ + staticRouteConfiguration?: StaticRouteConfiguration; + /** BGP configuration properties */ + bgpConfiguration?: BgpConfiguration; + /** ARM resource ID of importRoutePolicy. */ + importRoutePolicyId?: string; + /** ARM resource ID of importRoutePolicy. */ + exportRoutePolicyId?: string; + /** + * List of resources the InternalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disabledOnResources?: string[]; + /** + * Administrative state of the InternalNetwork. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * List of resources the BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bgpDisabledOnResources?: string[]; + /** + * List of resources the BFD for BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bfdDisabledOnResources?: string[]; + /** + * List of resources the BFD of StaticRoutes is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bfdForStaticRoutesDisabledOnResources?: string[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Vlan identifier. Example: 1001. */ + vlanId: number; +} + +/** Defines the ExternalNetwork item. */ +export interface ExternalNetwork extends ProxyResource { + /** Switch configuration description. */ + annotation?: string; + /** + * Gets the networkToNetworkInterconnectId of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkToNetworkInterconnectId?: string; + /** + * List of resources the externalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disabledOnResources?: string[]; + /** + * AdministrativeState of the externalNetwork. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Peering option list. */ + peeringOption: PeeringOption; + /** option B properties object */ + optionBProperties?: OptionBProperties; + /** option A properties object */ + optionAProperties?: ExternalNetworkPropertiesOptionAProperties; + /** ARM resource ID of importRoutePolicy. */ + importRoutePolicyId?: string; + /** ARM resource ID of exportRoutePolicy. */ + exportRoutePolicyId?: string; +} + +/** The NetworkDeviceSku resource definition. */ +export interface NetworkDeviceSku extends ProxyResource { + /** Model of the network device. */ + model: string; + /** Manufacturer of the network device. */ + manufacturer?: string; + /** List of network device interfaces. */ + supportedVersions?: SupportedVersionProperties[]; + /** Network device limits. */ + limits?: DeviceLimits; + /** Available roles for the network device. */ + supportedRoleTypes?: NetworkDeviceRoleName[]; + /** List of network device interfaces. */ + interfaces?: DeviceInterfaceProperties[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Defines the NetworkInterface resource. */ +export interface NetworkInterface extends ProxyResource { + /** Switch configuration description. */ + annotation?: string; + /** + * physicalIdentifier of the network interface. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly physicalIdentifier?: string; + /** + * administrativeState of the network interface. Example: Enabled | Disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The arm resource id of the interface or compute server its connected to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectedTo?: string; + /** + * The Interface Type. Example: Management/Data + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly interfaceType?: InterfaceType; + /** + * ipv4Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipv4Address?: string; + /** + * ipv6Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipv6Address?: string; +} + +/** The NetworkFabricSku resource definition. */ +export interface NetworkFabricSku extends ProxyResource { + /** + * Type of Network Fabric Sku. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly typePropertiesType?: string; + /** Maximum number of compute racks available for this Network Fabric SKU. */ + maxComputeRacks?: number; + /** + * Minimum supported version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minSupportedVer?: string; + /** + * Maximum supported version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxSupportedVer?: string; + /** + * The URI gives full details of sku. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly detailsUri?: string; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The NetworkToNetworkInterconnect resource definition. */ +export interface NetworkToNetworkInterconnect extends ProxyResource { + /** Type of NNI used. Example: CE | NPB */ + nniType?: NniType; + /** + * Gets the administrativeState of the resource. Example -Enabled/Disabled + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly administrativeState?: EnabledDisabledState; + /** Configuration to use NNI for Infrastructure Management. Example: True/False. */ + isManagementType?: BooleanEnumProperty; + /** Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False */ + useOptionB?: BooleanEnumProperty; + /** Common properties for Layer2Configuration. */ + layer2Configuration?: Layer2Configuration; + /** Common properties for Layer3Configuration. */ + layer3Configuration?: Layer3Configuration; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** The NetworkRackSku resource definition. */ +export interface NetworkRackSku extends ProxyResource { + /** The role of the Network Rack: Aggregate or Compute. */ + roleName: NetworkRackRoleName; + /** Maximum number of servers available for this SKU. */ + maximumServerCount?: number; + /** Maximum number of storage devices available for this SKU. */ + maximumStorageCount?: number; + /** Maximum number of network uplinks available for this SKU. */ + maximumUplinks?: number; + /** List of network device properties / role for the Network Rack. */ + networkDevices?: NetworkDeviceRoleProperties[]; + /** + * Gets the provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** option A properties object */ +export interface ExternalNetworkPropertiesOptionAProperties + extends Layer3OptionAProperties {} + +/** Defines headers for IpCommunities_create operation. */ +export interface IpCommunitiesCreateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for IpCommunities_update operation. */ +export interface IpCommunitiesUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for IpCommunities_delete operation. */ +export interface IpCommunitiesDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for IpExtendedCommunities_create operation. */ +export interface IpExtendedCommunitiesCreateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for IpExtendedCommunities_update operation. */ +export interface IpExtendedCommunitiesUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for IpExtendedCommunities_delete operation. */ +export interface IpExtendedCommunitiesDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for IpPrefixes_create operation. */ +export interface IpPrefixesCreateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for IpPrefixes_update operation. */ +export interface IpPrefixesUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for IpPrefixes_delete operation. */ +export interface IpPrefixesDeleteHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for L2IsolationDomains_update operation. */ +export interface L2IsolationDomainsUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for L2IsolationDomains_updateAdministrativeState operation. */ +export interface L2IsolationDomainsUpdateAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for L2IsolationDomains_clearArpTable operation. */ +export interface L2IsolationDomainsClearArpTableHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for L2IsolationDomains_clearNeighborTable operation. */ +export interface L2IsolationDomainsClearNeighborTableHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for L2IsolationDomains_getArpEntries operation. */ +export interface L2IsolationDomainsGetArpEntriesHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for L3IsolationDomains_update operation. */ +export interface L3IsolationDomainsUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for L3IsolationDomains_updateAdministrativeState operation. */ +export interface L3IsolationDomainsUpdateAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for L3IsolationDomains_updateOptionBAdministrativeState operation. */ +export interface L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for L3IsolationDomains_clearArpTable operation. */ +export interface L3IsolationDomainsClearArpTableHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for L3IsolationDomains_clearNeighborTable operation. */ +export interface L3IsolationDomainsClearNeighborTableHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for InternalNetworks_updateAdministrativeState operation. */ +export interface InternalNetworksUpdateAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for InternalNetworks_updateBgpAdministrativeState operation. */ +export interface InternalNetworksUpdateBgpAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for InternalNetworks_updateBfdForBgpAdministrativeState operation. */ +export interface InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for InternalNetworks_clearIpv6Neighbors operation. */ +export interface InternalNetworksClearIpv6NeighborsHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for InternalNetworks_clearArpEntries operation. */ +export interface InternalNetworksClearArpEntriesHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for InternalNetworks_updateBfdForStaticRouteAdministrativeState operation. */ +export interface InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for ExternalNetworks_updateAdministrativeState operation. */ +export interface ExternalNetworksUpdateAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for ExternalNetworks_updateBgpAdministrativeState operation. */ +export interface ExternalNetworksUpdateBgpAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for ExternalNetworks_updateBfdForBgpAdministrativeState operation. */ +export interface ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for ExternalNetworks_clearIpv6Neighbors operation. */ +export interface ExternalNetworksClearIpv6NeighborsHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for ExternalNetworks_clearArpEntries operation. */ +export interface ExternalNetworksClearArpEntriesHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkDevices_update operation. */ +export interface NetworkDevicesUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for NetworkDevices_reboot operation. */ +export interface NetworkDevicesRebootHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkDevices_restoreConfig operation. */ +export interface NetworkDevicesRestoreConfigHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkDevices_updateVersion operation. */ +export interface NetworkDevicesUpdateVersionHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkDevices_generateSupportPackage operation. */ +export interface NetworkDevicesGenerateSupportPackageHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkDevices_updatePowerCycle operation. */ +export interface NetworkDevicesUpdatePowerCycleHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkDevices_getStatus operation. */ +export interface NetworkDevicesGetStatusHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkDevices_getStaticInterfaceMaps operation. */ +export interface NetworkDevicesGetStaticInterfaceMapsHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkDevices_getDynamicInterfaceMaps operation. */ +export interface NetworkDevicesGetDynamicInterfaceMapsHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkInterfaces_getStatus operation. */ +export interface NetworkInterfacesGetStatusHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkInterfaces_updateAdministrativeState operation. */ +export interface NetworkInterfacesUpdateAdministrativeStateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkFabricControllers_update operation. */ +export interface NetworkFabricControllersUpdateHeaders { + /** Tracking URL for long running operation. */ + location?: string; +} + +/** Defines headers for NetworkFabricControllers_delete operation. */ +export interface NetworkFabricControllersDeleteHeaders { + /** Tracking URL for long running operation. */ + location?: string; +} + +/** Defines headers for NetworkFabricControllers_enableWorkloadManagementNetwork operation. */ +export interface NetworkFabricControllersEnableWorkloadManagementNetworkHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkFabricControllers_disableWorkloadManagementNetwork operation. */ +export interface NetworkFabricControllersDisableWorkloadManagementNetworkHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkFabrics_create operation. */ +export interface NetworkFabricsCreateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for NetworkFabrics_update operation. */ +export interface NetworkFabricsUpdateHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkFabrics_delete operation. */ +export interface NetworkFabricsDeleteHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkFabrics_provision operation. */ +export interface NetworkFabricsProvisionHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkFabrics_deprovision operation. */ +export interface NetworkFabricsDeprovisionHeaders { + /** The URL to retrieve the status of the asynchronous operation. */ + location?: string; +} + +/** Defines headers for NetworkRacks_update operation. */ +export interface NetworkRacksUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for RoutePolicies_update operation. */ +export interface RoutePoliciesUpdateHeaders { + /** Tracking URL for long running operation. */ + azureAsyncOperation?: string; +} + +/** Known values of {@link AddressFamily} that the service accepts. */ +export enum KnownAddressFamily { + /** Ipv4 */ + Ipv4 = "ipv4", + /** Ipv6 */ + Ipv6 = "ipv6" +} + +/** + * Defines values for AddressFamily. \ + * {@link KnownAddressFamily} can be used interchangeably with AddressFamily, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ipv4** \ + * **ipv6** + */ +export type AddressFamily = string; + +/** Known values of {@link ConditionActionType} that the service accepts. */ +export enum KnownConditionActionType { + /** Allow */ + Allow = "allow", + /** Deny */ + Deny = "deny" +} + +/** + * Defines values for ConditionActionType. \ + * {@link KnownConditionActionType} can be used interchangeably with ConditionActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **allow** \ + * **deny** + */ +export type ConditionActionType = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Updating */ + Updating = "Updating", + /** Canceled */ + Canceled = "Canceled", + /** Deleting */ + Deleting = "Deleting", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Updating** \ + * **Canceled** \ + * **Deleting** \ + * **Failed** + */ +export type ProvisioningState = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link CommunityActionTypes} that the service accepts. */ +export enum KnownCommunityActionTypes { + /** Permit */ + Permit = "Permit", + /** Deny */ + Deny = "Deny" +} + +/** + * Defines values for CommunityActionTypes. \ + * {@link KnownCommunityActionTypes} can be used interchangeably with CommunityActionTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Permit** \ + * **Deny** + */ +export type CommunityActionTypes = string; + +/** Known values of {@link WellKnownCommunities} that the service accepts. */ +export enum KnownWellKnownCommunities { + /** Internet */ + Internet = "Internet", + /** LocalAS */ + LocalAS = "LocalAS", + /** NoAdvertise */ + NoAdvertise = "NoAdvertise", + /** NoExport */ + NoExport = "NoExport", + /** GShut */ + GShut = "GShut" +} + +/** + * Defines values for WellKnownCommunities. \ + * {@link KnownWellKnownCommunities} can be used interchangeably with WellKnownCommunities, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internet** \ + * **LocalAS** \ + * **NoAdvertise** \ + * **NoExport** \ + * **GShut** + */ +export type WellKnownCommunities = string; + +/** Known values of {@link Condition} that the service accepts. */ +export enum KnownCondition { + /** EqualTo */ + EqualTo = "EqualTo", + /** GreaterThanOrEqualTo */ + GreaterThanOrEqualTo = "GreaterThanOrEqualTo", + /** LesserThanOrEqualTo */ + LesserThanOrEqualTo = "LesserThanOrEqualTo" +} + +/** + * Defines values for Condition. \ + * {@link KnownCondition} can be used interchangeably with Condition, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EqualTo** \ + * **GreaterThanOrEqualTo** \ + * **LesserThanOrEqualTo** + */ +export type Condition = string; + +/** Known values of {@link EnabledDisabledState} that the service accepts. */ +export enum KnownEnabledDisabledState { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for EnabledDisabledState. \ + * {@link KnownEnabledDisabledState} can be used interchangeably with EnabledDisabledState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type EnabledDisabledState = string; + +/** Known values of {@link AdministrativeState} that the service accepts. */ +export enum KnownAdministrativeState { + /** Enable */ + Enable = "Enable", + /** Disable */ + Disable = "Disable" +} + +/** + * Defines values for AdministrativeState. \ + * {@link KnownAdministrativeState} can be used interchangeably with AdministrativeState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enable** \ + * **Disable** + */ +export type AdministrativeState = string; + +/** Known values of {@link RedistributeConnectedSubnets} that the service accepts. */ +export enum KnownRedistributeConnectedSubnets { + /** True */ + True = "True", + /** False */ + False = "False" +} + +/** + * Defines values for RedistributeConnectedSubnets. \ + * {@link KnownRedistributeConnectedSubnets} can be used interchangeably with RedistributeConnectedSubnets, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True** \ + * **False** + */ +export type RedistributeConnectedSubnets = string; + +/** Known values of {@link RedistributeStaticRoutes} that the service accepts. */ +export enum KnownRedistributeStaticRoutes { + /** True */ + True = "True", + /** False */ + False = "False" +} + +/** + * Defines values for RedistributeStaticRoutes. \ + * {@link KnownRedistributeStaticRoutes} can be used interchangeably with RedistributeStaticRoutes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True** \ + * **False** + */ +export type RedistributeStaticRoutes = string; + +/** Known values of {@link BooleanEnumProperty} that the service accepts. */ +export enum KnownBooleanEnumProperty { + /** True */ + True = "True", + /** False */ + False = "False" +} + +/** + * Defines values for BooleanEnumProperty. \ + * {@link KnownBooleanEnumProperty} can be used interchangeably with BooleanEnumProperty, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **True** \ + * **False** + */ +export type BooleanEnumProperty = string; + +/** Known values of {@link AllowASOverride} that the service accepts. */ +export enum KnownAllowASOverride { + /** Enable */ + Enable = "Enable", + /** Disable */ + Disable = "Disable" +} + +/** + * Defines values for AllowASOverride. \ + * {@link KnownAllowASOverride} can be used interchangeably with AllowASOverride, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enable** \ + * **Disable** + */ +export type AllowASOverride = string; + +/** Known values of {@link PeeringOption} that the service accepts. */ +export enum KnownPeeringOption { + /** OptionA */ + OptionA = "OptionA", + /** OptionB */ + OptionB = "OptionB" +} + +/** + * Defines values for PeeringOption. \ + * {@link KnownPeeringOption} can be used interchangeably with PeeringOption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OptionA** \ + * **OptionB** + */ +export type PeeringOption = string; + +/** Known values of {@link IsCurrentVersion} that the service accepts. */ +export enum KnownIsCurrentVersion { + /** True */ + True = "true", + /** False */ + False = "false" +} + +/** + * Defines values for IsCurrentVersion. \ + * {@link KnownIsCurrentVersion} can be used interchangeably with IsCurrentVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true** \ + * **false** + */ +export type IsCurrentVersion = string; + +/** Known values of {@link IsTestVersion} that the service accepts. */ +export enum KnownIsTestVersion { + /** True */ + True = "true", + /** False */ + False = "false" +} + +/** + * Defines values for IsTestVersion. \ + * {@link KnownIsTestVersion} can be used interchangeably with IsTestVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true** \ + * **false** + */ +export type IsTestVersion = string; + +/** Known values of {@link NetworkDeviceRoleName} that the service accepts. */ +export enum KnownNetworkDeviceRoleName { + /** CE */ + CE = "CE", + /** ToR */ + ToR = "ToR", + /** NPB */ + NPB = "NPB", + /** TS */ + TS = "TS", + /** Management */ + Management = "Management" +} + +/** + * Defines values for NetworkDeviceRoleName. \ + * {@link KnownNetworkDeviceRoleName} can be used interchangeably with NetworkDeviceRoleName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CE** \ + * **ToR** \ + * **NPB** \ + * **TS** \ + * **Management** + */ +export type NetworkDeviceRoleName = string; + +/** Known values of {@link NetworkDeviceRoleTypes} that the service accepts. */ +export enum KnownNetworkDeviceRoleTypes { + /** CE */ + CE = "CE", + /** ToR */ + ToR = "ToR", + /** NPB */ + NPB = "NPB", + /** TS */ + TS = "TS", + /** Management */ + Management = "Management" +} + +/** + * Defines values for NetworkDeviceRoleTypes. \ + * {@link KnownNetworkDeviceRoleTypes} can be used interchangeably with NetworkDeviceRoleTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CE** \ + * **ToR** \ + * **NPB** \ + * **TS** \ + * **Management** + */ +export type NetworkDeviceRoleTypes = string; + +/** Known values of {@link InterfaceType} that the service accepts. */ +export enum KnownInterfaceType { + /** Management */ + Management = "Management", + /** Data */ + Data = "Data" +} + +/** + * Defines values for InterfaceType. \ + * {@link KnownInterfaceType} can be used interchangeably with InterfaceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Management** \ + * **Data** + */ +export type InterfaceType = string; + +/** Known values of {@link PowerEnd} that the service accepts. */ +export enum KnownPowerEnd { + /** Primary */ + Primary = "Primary", + /** Secondary */ + Secondary = "Secondary" +} + +/** + * Defines values for PowerEnd. \ + * {@link KnownPowerEnd} can be used interchangeably with PowerEnd, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary** \ + * **Secondary** + */ +export type PowerEnd = string; + +/** Known values of {@link State} that the service accepts. */ +export enum KnownState { + /** On */ + On = "On", + /** Off */ + Off = "Off" +} + +/** + * Defines values for State. \ + * {@link KnownState} can be used interchangeably with State, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **On** \ + * **Off** + */ +export type State = string; + +/** Known values of {@link OperationalStatus} that the service accepts. */ +export enum KnownOperationalStatus { + /** Booted */ + Booted = "Booted", + /** BootPrompt */ + BootPrompt = "BootPrompt", + /** Ztp */ + Ztp = "Ztp" +} + +/** + * Defines values for OperationalStatus. \ + * {@link KnownOperationalStatus} can be used interchangeably with OperationalStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Booted** \ + * **BootPrompt** \ + * **Ztp** + */ +export type OperationalStatus = string; + +/** Known values of {@link PowerCycleState} that the service accepts. */ +export enum KnownPowerCycleState { + /** On */ + On = "On", + /** Off */ + Off = "Off" +} + +/** + * Defines values for PowerCycleState. \ + * {@link KnownPowerCycleState} can be used interchangeably with PowerCycleState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **On** \ + * **Off** + */ +export type PowerCycleState = string; + +/** Known values of {@link NetworkFabricControllerOperationalState} that the service accepts. */ +export enum KnownNetworkFabricControllerOperationalState { + /** Configuring */ + Configuring = "Configuring", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for NetworkFabricControllerOperationalState. \ + * {@link KnownNetworkFabricControllerOperationalState} can be used interchangeably with NetworkFabricControllerOperationalState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Configuring** \ + * **Succeeded** \ + * **Failed** + */ +export type NetworkFabricControllerOperationalState = string; + +/** Known values of {@link NetworkFabricOperationalState} that the service accepts. */ +export enum KnownNetworkFabricOperationalState { + /** Provisioning */ + Provisioning = "Provisioning", + /** Provisioned */ + Provisioned = "Provisioned", + /** ErrorProvisioning */ + ErrorProvisioning = "ErrorProvisioning", + /** Deprovisioning */ + Deprovisioning = "Deprovisioning", + /** Deprovisioned */ + Deprovisioned = "Deprovisioned", + /** ErrorDeprovisioning */ + ErrorDeprovisioning = "ErrorDeprovisioning", + /** DeferredControl */ + DeferredControl = "DeferredControl" +} + +/** + * Defines values for NetworkFabricOperationalState. \ + * {@link KnownNetworkFabricOperationalState} can be used interchangeably with NetworkFabricOperationalState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Provisioning** \ + * **Provisioned** \ + * **ErrorProvisioning** \ + * **Deprovisioning** \ + * **Deprovisioned** \ + * **ErrorDeprovisioning** \ + * **DeferredControl** + */ +export type NetworkFabricOperationalState = string; + +/** Known values of {@link NniType} that the service accepts. */ +export enum KnownNniType { + /** CE */ + CE = "CE", + /** NPB */ + NPB = "NPB" +} + +/** + * Defines values for NniType. \ + * {@link KnownNniType} can be used interchangeably with NniType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CE** \ + * **NPB** + */ +export type NniType = string; + +/** Known values of {@link NetworkRackRoleName} that the service accepts. */ +export enum KnownNetworkRackRoleName { + /** ComputeRack */ + ComputeRack = "ComputeRack", + /** AggregateRack */ + AggregateRack = "AggregateRack" +} + +/** + * Defines values for NetworkRackRoleName. \ + * {@link KnownNetworkRackRoleName} can be used interchangeably with NetworkRackRoleName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ComputeRack** \ + * **AggregateRack** + */ +export type NetworkRackRoleName = string; + +/** Known values of {@link NetworkDeviceRackRoleType} that the service accepts. */ +export enum KnownNetworkDeviceRackRoleType { + /** CE */ + CE = "CE", + /** ToR */ + ToR = "ToR", + /** NPB */ + NPB = "NPB", + /** TS */ + TS = "TS", + /** Management */ + Management = "Management" +} + +/** + * Defines values for NetworkDeviceRackRoleType. \ + * {@link KnownNetworkDeviceRackRoleType} can be used interchangeably with NetworkDeviceRackRoleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CE** \ + * **ToR** \ + * **NPB** \ + * **TS** \ + * **Management** + */ +export type NetworkDeviceRackRoleType = string; + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Known values of {@link ExpressRouteConnectionState} that the service accepts. */ +export enum KnownExpressRouteConnectionState { + /** Connecting */ + Connecting = "Connecting", + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected" +} + +/** + * Defines values for ExpressRouteConnectionState. \ + * {@link KnownExpressRouteConnectionState} can be used interchangeably with ExpressRouteConnectionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Connecting** \ + * **Connected** \ + * **Disconnected** + */ +export type ExpressRouteConnectionState = string; + +/** Known values of {@link TerminalServerConnectivityState} that the service accepts. */ +export enum KnownTerminalServerConnectivityState { + /** Ipv4Reachable */ + Ipv4Reachable = "Ipv4Reachable", + /** Ipv4Unreachable */ + Ipv4Unreachable = "Ipv4Unreachable" +} + +/** + * Defines values for TerminalServerConnectivityState. \ + * {@link KnownTerminalServerConnectivityState} can be used interchangeably with TerminalServerConnectivityState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Ipv4Reachable** \ + * **Ipv4Unreachable** + */ +export type TerminalServerConnectivityState = string; + +/** Known values of {@link OperationalState} that the service accepts. */ +export enum KnownOperationalState { + /** Configuring */ + Configuring = "Configuring", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for OperationalState. \ + * {@link KnownOperationalState} can be used interchangeably with OperationalState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Configuring** \ + * **Succeeded** \ + * **Failed** + */ +export type OperationalState = string; + +/** Known values of {@link ReachabilityState} that the service accepts. */ +export enum KnownReachabilityState { + /** Reachable */ + Reachable = "Reachable", + /** Unreachable */ + Unreachable = "Unreachable" +} + +/** + * Defines values for ReachabilityState. \ + * {@link KnownReachabilityState} can be used interchangeably with ReachabilityState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Reachable** \ + * **Unreachable** + */ +export type ReachabilityState = string; + +/** Known values of {@link FailedSucceededState} that the service accepts. */ +export enum KnownFailedSucceededState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for FailedSucceededState. \ + * {@link KnownFailedSucceededState} can be used interchangeably with FailedSucceededState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** + */ +export type FailedSucceededState = string; + +/** Optional parameters. */ +export interface AccessControlListsCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type AccessControlListsCreateResponse = AccessControlList; + +/** Optional parameters. */ +export interface AccessControlListsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AccessControlListsGetResponse = AccessControlList; + +/** Optional parameters. */ +export interface AccessControlListsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type AccessControlListsUpdateResponse = AccessControlList; + +/** Optional parameters. */ +export interface AccessControlListsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface AccessControlListsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type AccessControlListsListByResourceGroupResponse = AccessControlListsListResult; + +/** Optional parameters. */ +export interface AccessControlListsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type AccessControlListsListBySubscriptionResponse = AccessControlListsListResult; + +/** Optional parameters. */ +export interface AccessControlListsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type AccessControlListsListByResourceGroupNextResponse = AccessControlListsListResult; + +/** Optional parameters. */ +export interface AccessControlListsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type AccessControlListsListBySubscriptionNextResponse = AccessControlListsListResult; + +/** Optional parameters. */ +export interface IpCommunitiesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type IpCommunitiesCreateResponse = IpCommunity; + +/** Optional parameters. */ +export interface IpCommunitiesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type IpCommunitiesGetResponse = IpCommunity; + +/** Optional parameters. */ +export interface IpCommunitiesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type IpCommunitiesUpdateResponse = IpCommunity; + +/** Optional parameters. */ +export interface IpCommunitiesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface IpCommunitiesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type IpCommunitiesListByResourceGroupResponse = IpCommunitiesListResult; + +/** Optional parameters. */ +export interface IpCommunitiesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type IpCommunitiesListBySubscriptionResponse = IpCommunitiesListResult; + +/** Optional parameters. */ +export interface IpCommunitiesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type IpCommunitiesListByResourceGroupNextResponse = IpCommunitiesListResult; + +/** Optional parameters. */ +export interface IpCommunitiesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type IpCommunitiesListBySubscriptionNextResponse = IpCommunitiesListResult; + +/** Optional parameters. */ +export interface IpExtendedCommunitiesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type IpExtendedCommunitiesCreateResponse = IpExtendedCommunity; + +/** Optional parameters. */ +export interface IpExtendedCommunitiesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type IpExtendedCommunitiesGetResponse = IpExtendedCommunity; + +/** Optional parameters. */ +export interface IpExtendedCommunitiesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type IpExtendedCommunitiesUpdateResponse = IpExtendedCommunity; + +/** Optional parameters. */ +export interface IpExtendedCommunitiesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface IpExtendedCommunitiesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type IpExtendedCommunitiesListByResourceGroupResponse = IpExtendedCommunityListResult; + +/** Optional parameters. */ +export interface IpExtendedCommunitiesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type IpExtendedCommunitiesListBySubscriptionResponse = IpExtendedCommunityListResult; + +/** Optional parameters. */ +export interface IpExtendedCommunitiesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type IpExtendedCommunitiesListByResourceGroupNextResponse = IpExtendedCommunityListResult; + +/** Optional parameters. */ +export interface IpExtendedCommunitiesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type IpExtendedCommunitiesListBySubscriptionNextResponse = IpExtendedCommunityListResult; + +/** Optional parameters. */ +export interface IpPrefixesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type IpPrefixesCreateResponse = IpPrefix; + +/** Optional parameters. */ +export interface IpPrefixesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type IpPrefixesGetResponse = IpPrefix; + +/** Optional parameters. */ +export interface IpPrefixesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type IpPrefixesUpdateResponse = IpPrefix; + +/** Optional parameters. */ +export interface IpPrefixesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface IpPrefixesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type IpPrefixesListByResourceGroupResponse = IpPrefixesListResult; + +/** Optional parameters. */ +export interface IpPrefixesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type IpPrefixesListBySubscriptionResponse = IpPrefixesListResult; + +/** Optional parameters. */ +export interface IpPrefixesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type IpPrefixesListByResourceGroupNextResponse = IpPrefixesListResult; + +/** Optional parameters. */ +export interface IpPrefixesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type IpPrefixesListBySubscriptionNextResponse = IpPrefixesListResult; + +/** Optional parameters. */ +export interface L2IsolationDomainsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type L2IsolationDomainsCreateResponse = L2IsolationDomain; + +/** Optional parameters. */ +export interface L2IsolationDomainsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type L2IsolationDomainsGetResponse = L2IsolationDomain; + +/** Optional parameters. */ +export interface L2IsolationDomainsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type L2IsolationDomainsUpdateResponse = L2IsolationDomain; + +/** Optional parameters. */ +export interface L2IsolationDomainsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface L2IsolationDomainsUpdateAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateAdministrativeState operation. */ +export type L2IsolationDomainsUpdateAdministrativeStateResponse = L2IsolationDomainsUpdateAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface L2IsolationDomainsClearArpTableOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the clearArpTable operation. */ +export type L2IsolationDomainsClearArpTableResponse = L2IsolationDomainsClearArpTableHeaders; + +/** Optional parameters. */ +export interface L2IsolationDomainsClearNeighborTableOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the clearNeighborTable operation. */ +export type L2IsolationDomainsClearNeighborTableResponse = L2IsolationDomainsClearNeighborTableHeaders; + +/** Optional parameters. */ +export interface L2IsolationDomainsGetArpEntriesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the getArpEntries operation. */ +export type L2IsolationDomainsGetArpEntriesResponse = L2IsolationDomainsGetArpEntriesHeaders & { + [propertyName: string]: ARPProperties; +}; + +/** Optional parameters. */ +export interface L2IsolationDomainsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type L2IsolationDomainsListByResourceGroupResponse = L2IsolationDomainsListResult; + +/** Optional parameters. */ +export interface L2IsolationDomainsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type L2IsolationDomainsListBySubscriptionResponse = L2IsolationDomainsListResult; + +/** Optional parameters. */ +export interface L2IsolationDomainsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type L2IsolationDomainsListByResourceGroupNextResponse = L2IsolationDomainsListResult; + +/** Optional parameters. */ +export interface L2IsolationDomainsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type L2IsolationDomainsListBySubscriptionNextResponse = L2IsolationDomainsListResult; + +/** Optional parameters. */ +export interface L3IsolationDomainsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type L3IsolationDomainsCreateResponse = L3IsolationDomain; + +/** Optional parameters. */ +export interface L3IsolationDomainsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type L3IsolationDomainsGetResponse = L3IsolationDomain; + +/** Optional parameters. */ +export interface L3IsolationDomainsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type L3IsolationDomainsUpdateResponse = L3IsolationDomain; + +/** Optional parameters. */ +export interface L3IsolationDomainsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface L3IsolationDomainsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type L3IsolationDomainsListByResourceGroupResponse = L3IsolationDomainsListResult; + +/** Optional parameters. */ +export interface L3IsolationDomainsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type L3IsolationDomainsListBySubscriptionResponse = L3IsolationDomainsListResult; + +/** Optional parameters. */ +export interface L3IsolationDomainsUpdateAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateAdministrativeState operation. */ +export type L3IsolationDomainsUpdateAdministrativeStateResponse = L3IsolationDomainsUpdateAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateOptionBAdministrativeState operation. */ +export type L3IsolationDomainsUpdateOptionBAdministrativeStateResponse = L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface L3IsolationDomainsClearArpTableOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the clearArpTable operation. */ +export type L3IsolationDomainsClearArpTableResponse = L3IsolationDomainsClearArpTableHeaders; + +/** Optional parameters. */ +export interface L3IsolationDomainsClearNeighborTableOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the clearNeighborTable operation. */ +export type L3IsolationDomainsClearNeighborTableResponse = L3IsolationDomainsClearNeighborTableHeaders; + +/** Optional parameters. */ +export interface L3IsolationDomainsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type L3IsolationDomainsListByResourceGroupNextResponse = L3IsolationDomainsListResult; + +/** Optional parameters. */ +export interface L3IsolationDomainsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type L3IsolationDomainsListBySubscriptionNextResponse = L3IsolationDomainsListResult; + +/** Optional parameters. */ +export interface InternalNetworksCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type InternalNetworksCreateResponse = InternalNetwork; + +/** Optional parameters. */ +export interface InternalNetworksGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type InternalNetworksGetResponse = InternalNetwork; + +/** Optional parameters. */ +export interface InternalNetworksUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type InternalNetworksUpdateResponse = InternalNetwork; + +/** Optional parameters. */ +export interface InternalNetworksDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface InternalNetworksListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type InternalNetworksListResponse = InternalNetworksList; + +/** Optional parameters. */ +export interface InternalNetworksUpdateAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateAdministrativeState operation. */ +export type InternalNetworksUpdateAdministrativeStateResponse = InternalNetworksUpdateAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface InternalNetworksUpdateBgpAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateBgpAdministrativeState operation. */ +export type InternalNetworksUpdateBgpAdministrativeStateResponse = InternalNetworksUpdateBgpAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateBfdForBgpAdministrativeState operation. */ +export type InternalNetworksUpdateBfdForBgpAdministrativeStateResponse = InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface InternalNetworksClearIpv6NeighborsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the clearIpv6Neighbors operation. */ +export type InternalNetworksClearIpv6NeighborsResponse = InternalNetworksClearIpv6NeighborsHeaders; + +/** Optional parameters. */ +export interface InternalNetworksClearArpEntriesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the clearArpEntries operation. */ +export type InternalNetworksClearArpEntriesResponse = InternalNetworksClearArpEntriesHeaders; + +/** Optional parameters. */ +export interface InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateBfdForStaticRouteAdministrativeState operation. */ +export type InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse = InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface InternalNetworksListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type InternalNetworksListNextResponse = InternalNetworksList; + +/** Optional parameters. */ +export interface ExternalNetworksCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type ExternalNetworksCreateResponse = ExternalNetwork; + +/** Optional parameters. */ +export interface ExternalNetworksGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ExternalNetworksGetResponse = ExternalNetwork; + +/** Optional parameters. */ +export interface ExternalNetworksUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type ExternalNetworksUpdateResponse = ExternalNetwork; + +/** Optional parameters. */ +export interface ExternalNetworksDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ExternalNetworksListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ExternalNetworksListResponse = ExternalNetworksList; + +/** Optional parameters. */ +export interface ExternalNetworksUpdateAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateAdministrativeState operation. */ +export type ExternalNetworksUpdateAdministrativeStateResponse = ExternalNetworksUpdateAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface ExternalNetworksUpdateBgpAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateBgpAdministrativeState operation. */ +export type ExternalNetworksUpdateBgpAdministrativeStateResponse = ExternalNetworksUpdateBgpAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateBfdForBgpAdministrativeState operation. */ +export type ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse = ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface ExternalNetworksClearIpv6NeighborsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the clearIpv6Neighbors operation. */ +export type ExternalNetworksClearIpv6NeighborsResponse = ExternalNetworksClearIpv6NeighborsHeaders; + +/** Optional parameters. */ +export interface ExternalNetworksClearArpEntriesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the clearArpEntries operation. */ +export type ExternalNetworksClearArpEntriesResponse = ExternalNetworksClearArpEntriesHeaders; + +/** Optional parameters. */ +export interface ExternalNetworksListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ExternalNetworksListNextResponse = ExternalNetworksList; + +/** Optional parameters. */ +export interface NetworkDeviceSkusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkDeviceSkusGetResponse = NetworkDeviceSku; + +/** Optional parameters. */ +export interface NetworkDeviceSkusListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type NetworkDeviceSkusListBySubscriptionResponse = NetworkDeviceSkusListResult; + +/** Optional parameters. */ +export interface NetworkDeviceSkusListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type NetworkDeviceSkusListBySubscriptionNextResponse = NetworkDeviceSkusListResult; + +/** Optional parameters. */ +export interface NetworkDevicesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type NetworkDevicesCreateResponse = NetworkDevice; + +/** Optional parameters. */ +export interface NetworkDevicesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkDevicesGetResponse = NetworkDevice; + +/** Optional parameters. */ +export interface NetworkDevicesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type NetworkDevicesUpdateResponse = NetworkDevice; + +/** Optional parameters. */ +export interface NetworkDevicesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface NetworkDevicesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type NetworkDevicesListByResourceGroupResponse = NetworkDevicesListResult; + +/** Optional parameters. */ +export interface NetworkDevicesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type NetworkDevicesListBySubscriptionResponse = NetworkDevicesListResult; + +/** Optional parameters. */ +export interface NetworkDevicesRebootOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the reboot operation. */ +export type NetworkDevicesRebootResponse = NetworkDevicesRebootHeaders; + +/** Optional parameters. */ +export interface NetworkDevicesRestoreConfigOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the restoreConfig operation. */ +export type NetworkDevicesRestoreConfigResponse = NetworkDevicesRestoreConfigHeaders; + +/** Optional parameters. */ +export interface NetworkDevicesUpdateVersionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateVersion operation. */ +export type NetworkDevicesUpdateVersionResponse = NetworkDevicesUpdateVersionHeaders; + +/** Optional parameters. */ +export interface NetworkDevicesGenerateSupportPackageOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the generateSupportPackage operation. */ +export type NetworkDevicesGenerateSupportPackageResponse = NetworkDevicesGenerateSupportPackageHeaders & + SupportPackageProperties; + +/** Optional parameters. */ +export interface NetworkDevicesUpdatePowerCycleOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updatePowerCycle operation. */ +export type NetworkDevicesUpdatePowerCycleResponse = NetworkDevicesUpdatePowerCycleHeaders; + +/** Optional parameters. */ +export interface NetworkDevicesGetStatusOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the getStatus operation. */ +export type NetworkDevicesGetStatusResponse = NetworkDevicesGetStatusHeaders & + GetDeviceStatusProperties; + +/** Optional parameters. */ +export interface NetworkDevicesGetStaticInterfaceMapsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the getStaticInterfaceMaps operation. */ +export type NetworkDevicesGetStaticInterfaceMapsResponse = NetworkDevicesGetStaticInterfaceMapsHeaders & + GetStaticInterfaceMapsPropertiesItem[]; + +/** Optional parameters. */ +export interface NetworkDevicesGetDynamicInterfaceMapsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the getDynamicInterfaceMaps operation. */ +export type NetworkDevicesGetDynamicInterfaceMapsResponse = NetworkDevicesGetDynamicInterfaceMapsHeaders & + GetDynamicInterfaceMapsPropertiesItem[]; + +/** Optional parameters. */ +export interface NetworkDevicesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type NetworkDevicesListByResourceGroupNextResponse = NetworkDevicesListResult; + +/** Optional parameters. */ +export interface NetworkDevicesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type NetworkDevicesListBySubscriptionNextResponse = NetworkDevicesListResult; + +/** Optional parameters. */ +export interface NetworkInterfacesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type NetworkInterfacesCreateResponse = NetworkInterface; + +/** Optional parameters. */ +export interface NetworkInterfacesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkInterfacesGetResponse = NetworkInterface; + +/** Optional parameters. */ +export interface NetworkInterfacesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type NetworkInterfacesUpdateResponse = NetworkInterface; + +/** Optional parameters. */ +export interface NetworkInterfacesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface NetworkInterfacesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type NetworkInterfacesListResponse = NetworkInterfacesList; + +/** Optional parameters. */ +export interface NetworkInterfacesGetStatusOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the getStatus operation. */ +export type NetworkInterfacesGetStatusResponse = NetworkInterfacesGetStatusHeaders & + InterfaceStatus; + +/** Optional parameters. */ +export interface NetworkInterfacesUpdateAdministrativeStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateAdministrativeState operation. */ +export type NetworkInterfacesUpdateAdministrativeStateResponse = NetworkInterfacesUpdateAdministrativeStateHeaders; + +/** Optional parameters. */ +export interface NetworkInterfacesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type NetworkInterfacesListNextResponse = NetworkInterfacesList; + +/** Optional parameters. */ +export interface NetworkFabricControllersCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type NetworkFabricControllersCreateResponse = NetworkFabricController; + +/** Optional parameters. */ +export interface NetworkFabricControllersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkFabricControllersGetResponse = NetworkFabricController; + +/** Optional parameters. */ +export interface NetworkFabricControllersUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type NetworkFabricControllersUpdateResponse = NetworkFabricController; + +/** Optional parameters. */ +export interface NetworkFabricControllersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface NetworkFabricControllersListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type NetworkFabricControllersListByResourceGroupResponse = NetworkFabricControllersListResult; + +/** Optional parameters. */ +export interface NetworkFabricControllersListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type NetworkFabricControllersListBySubscriptionResponse = NetworkFabricControllersListResult; + +/** Optional parameters. */ +export interface NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the enableWorkloadManagementNetwork operation. */ +export type NetworkFabricControllersEnableWorkloadManagementNetworkResponse = NetworkFabricControllersEnableWorkloadManagementNetworkHeaders; + +/** Optional parameters. */ +export interface NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the disableWorkloadManagementNetwork operation. */ +export type NetworkFabricControllersDisableWorkloadManagementNetworkResponse = NetworkFabricControllersDisableWorkloadManagementNetworkHeaders; + +/** Optional parameters. */ +export interface NetworkFabricControllersListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type NetworkFabricControllersListByResourceGroupNextResponse = NetworkFabricControllersListResult; + +/** Optional parameters. */ +export interface NetworkFabricControllersListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type NetworkFabricControllersListBySubscriptionNextResponse = NetworkFabricControllersListResult; + +/** Optional parameters. */ +export interface NetworkFabricSkusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkFabricSkusGetResponse = NetworkFabricSku; + +/** Optional parameters. */ +export interface NetworkFabricSkusListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type NetworkFabricSkusListBySubscriptionResponse = NetworkFabricSkusListResult; + +/** Optional parameters. */ +export interface NetworkFabricSkusListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type NetworkFabricSkusListBySubscriptionNextResponse = NetworkFabricSkusListResult; + +/** Optional parameters. */ +export interface NetworkFabricsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type NetworkFabricsCreateResponse = NetworkFabric; + +/** Optional parameters. */ +export interface NetworkFabricsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkFabricsGetResponse = NetworkFabric; + +/** Optional parameters. */ +export interface NetworkFabricsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type NetworkFabricsUpdateResponse = NetworkFabric; + +/** Optional parameters. */ +export interface NetworkFabricsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface NetworkFabricsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type NetworkFabricsListByResourceGroupResponse = NetworkFabricsListResult; + +/** Optional parameters. */ +export interface NetworkFabricsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type NetworkFabricsListBySubscriptionResponse = NetworkFabricsListResult; + +/** Optional parameters. */ +export interface NetworkFabricsProvisionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the provision operation. */ +export type NetworkFabricsProvisionResponse = NetworkFabricsProvisionHeaders; + +/** Optional parameters. */ +export interface NetworkFabricsDeprovisionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the deprovision operation. */ +export type NetworkFabricsDeprovisionResponse = NetworkFabricsDeprovisionHeaders; + +/** Optional parameters. */ +export interface NetworkFabricsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type NetworkFabricsListByResourceGroupNextResponse = NetworkFabricsListResult; + +/** Optional parameters. */ +export interface NetworkFabricsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type NetworkFabricsListBySubscriptionNextResponse = NetworkFabricsListResult; + +/** Optional parameters. */ +export interface NetworkToNetworkInterconnectsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type NetworkToNetworkInterconnectsCreateResponse = NetworkToNetworkInterconnect; + +/** Optional parameters. */ +export interface NetworkToNetworkInterconnectsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkToNetworkInterconnectsGetResponse = NetworkToNetworkInterconnect; + +/** Optional parameters. */ +export interface NetworkToNetworkInterconnectsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface NetworkToNetworkInterconnectsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type NetworkToNetworkInterconnectsListResponse = NetworkToNetworkInterconnectsList; + +/** Optional parameters. */ +export interface NetworkToNetworkInterconnectsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type NetworkToNetworkInterconnectsListNextResponse = NetworkToNetworkInterconnectsList; + +/** Optional parameters. */ +export interface NetworkRackSkusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkRackSkusGetResponse = NetworkRackSku; + +/** Optional parameters. */ +export interface NetworkRackSkusListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type NetworkRackSkusListBySubscriptionResponse = NetworkRackSkusListResult; + +/** Optional parameters. */ +export interface NetworkRackSkusListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type NetworkRackSkusListBySubscriptionNextResponse = NetworkRackSkusListResult; + +/** Optional parameters. */ +export interface NetworkRacksCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type NetworkRacksCreateResponse = NetworkRack; + +/** Optional parameters. */ +export interface NetworkRacksGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkRacksGetResponse = NetworkRack; + +/** Optional parameters. */ +export interface NetworkRacksUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type NetworkRacksUpdateResponse = NetworkRack; + +/** Optional parameters. */ +export interface NetworkRacksDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface NetworkRacksListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type NetworkRacksListByResourceGroupResponse = NetworkRacksListResult; + +/** Optional parameters. */ +export interface NetworkRacksListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type NetworkRacksListBySubscriptionResponse = NetworkRacksListResult; + +/** Optional parameters. */ +export interface NetworkRacksListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type NetworkRacksListByResourceGroupNextResponse = NetworkRacksListResult; + +/** Optional parameters. */ +export interface NetworkRacksListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type NetworkRacksListBySubscriptionNextResponse = NetworkRacksListResult; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface RoutePoliciesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type RoutePoliciesCreateResponse = RoutePolicy; + +/** Optional parameters. */ +export interface RoutePoliciesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type RoutePoliciesGetResponse = RoutePolicy; + +/** Optional parameters. */ +export interface RoutePoliciesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type RoutePoliciesUpdateResponse = RoutePolicy; + +/** Optional parameters. */ +export interface RoutePoliciesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface RoutePoliciesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type RoutePoliciesListByResourceGroupResponse = RoutePoliciesListResult; + +/** Optional parameters. */ +export interface RoutePoliciesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type RoutePoliciesListBySubscriptionResponse = RoutePoliciesListResult; + +/** Optional parameters. */ +export interface RoutePoliciesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type RoutePoliciesListByResourceGroupNextResponse = RoutePoliciesListResult; + +/** Optional parameters. */ +export interface RoutePoliciesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type RoutePoliciesListBySubscriptionNextResponse = RoutePoliciesListResult; + +/** Optional parameters. */ +export interface AzureNetworkFabricManagementServiceAPIOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/mappers.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/mappers.ts new file mode 100644 index 000000000000..77e2c2f89373 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/mappers.ts @@ -0,0 +1,6207 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export const AnnotationResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AnnotationResource", + modelProperties: { + annotation: { + serializedName: "annotation", + type: { + name: "String" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const AccessControlListPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlListPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + addressFamily: { + serializedName: "properties.addressFamily", + type: { + name: "String" + } + }, + conditions: { + serializedName: "properties.conditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlListConditionProperties" + } + } + } + } + } + } +}; + +export const AccessControlListsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlListsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlList" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IpCommunityPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunityPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const IpCommunitiesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunitiesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpCommunity" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IpExtendedCommunityPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunityPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const IpExtendedCommunityListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunityListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpExtendedCommunity" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const IpPrefixPropertiesIpPrefixRulesItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpPrefixPropertiesIpPrefixRulesItem", + modelProperties: { + action: { + serializedName: "action", + required: true, + type: { + name: "String" + } + }, + sequenceNumber: { + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 1 + }, + serializedName: "sequenceNumber", + required: true, + type: { + name: "Number" + } + }, + networkPrefix: { + serializedName: "networkPrefix", + required: true, + type: { + name: "String" + } + }, + condition: { + serializedName: "condition", + type: { + name: "String" + } + }, + subnetMaskLength: { + constraints: { + InclusiveMaximum: 128, + InclusiveMinimum: 1 + }, + serializedName: "subnetMaskLength", + type: { + name: "Number" + } + } + } + } +}; + +export const IpPrefixPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpPrefixPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const IpPrefixesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpPrefixesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpPrefix" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + mtu: { + serializedName: "properties.mtu", + type: { + name: "Number" + } + } + } + } +}; + +export const EnableDisableOnResources: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnableDisableOnResources", + modelProperties: { + resourceIds: { + serializedName: "resourceIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ARPProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ARPProperties", + modelProperties: { + address: { + serializedName: "address", + required: true, + type: { + name: "String" + } + }, + age: { + serializedName: "age", + required: true, + type: { + name: "String" + } + }, + macAddress: { + serializedName: "macAddress", + required: true, + type: { + name: "String" + } + }, + interface: { + serializedName: "interface", + required: true, + type: { + name: "String" + } + }, + state: { + serializedName: "state", + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "L2IsolationDomain" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomainPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainPatchProperties", + modelProperties: { + redistributeConnectedSubnets: { + defaultValue: "True", + serializedName: "redistributeConnectedSubnets", + type: { + name: "String" + } + }, + redistributeStaticRoutes: { + defaultValue: "False", + serializedName: "redistributeStaticRoutes", + type: { + name: "String" + } + }, + aggregateRouteConfiguration: { + serializedName: "aggregateRouteConfiguration", + type: { + name: "Composite", + className: "AggregateRouteConfiguration" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + connectedSubnetRoutePolicy: { + serializedName: "connectedSubnetRoutePolicy", + type: { + name: "Composite", + className: + "L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy" + } + } + } + } +}; + +export const AggregateRouteConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AggregateRouteConfiguration", + modelProperties: { + ipv4Routes: { + serializedName: "ipv4Routes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AggregateRoute" + } + } + } + }, + ipv6Routes: { + serializedName: "ipv6Routes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AggregateRoute" + } + } + } + } + } + } +}; + +export const AggregateRoute: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AggregateRoute", + modelProperties: { + prefix: { + serializedName: "prefix", + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy", + modelProperties: { + exportRoutePolicyId: { + serializedName: "exportRoutePolicyId", + type: { + name: "String" + } + }, + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomainPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + redistributeConnectedSubnets: { + defaultValue: "True", + serializedName: "properties.redistributeConnectedSubnets", + type: { + name: "String" + } + }, + redistributeStaticRoutes: { + defaultValue: "False", + serializedName: "properties.redistributeStaticRoutes", + type: { + name: "String" + } + }, + aggregateRouteConfiguration: { + serializedName: "properties.aggregateRouteConfiguration", + type: { + name: "Composite", + className: "AggregateRouteConfiguration" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + connectedSubnetRoutePolicy: { + serializedName: "properties.connectedSubnetRoutePolicy", + type: { + name: "Composite", + className: + "L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy" + } + } + } + } +}; + +export const L3IsolationDomainsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "L3IsolationDomain" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworkPatchableProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworkPatchableProperties", + modelProperties: { + mtu: { + defaultValue: 1500, + constraints: { + InclusiveMaximum: 9000, + InclusiveMinimum: 1500 + }, + serializedName: "mtu", + type: { + name: "Number" + } + }, + connectedIPv4Subnets: { + serializedName: "connectedIPv4Subnets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedSubnet" + } + } + } + }, + connectedIPv6Subnets: { + serializedName: "connectedIPv6Subnets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedSubnet" + } + } + } + }, + staticRouteConfiguration: { + serializedName: "staticRouteConfiguration", + type: { + name: "Composite", + className: "StaticRouteConfiguration" + } + }, + bgpConfiguration: { + serializedName: "bgpConfiguration", + type: { + name: "Composite", + className: "BgpConfiguration" + } + }, + importRoutePolicyId: { + serializedName: "importRoutePolicyId", + type: { + name: "String" + } + }, + exportRoutePolicyId: { + serializedName: "exportRoutePolicyId", + type: { + name: "String" + } + } + } + } +}; + +export const StaticRouteConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StaticRouteConfiguration", + modelProperties: { + bfdConfiguration: { + serializedName: "bfdConfiguration", + type: { + name: "Composite", + className: "BfdConfiguration" + } + }, + ipv4Routes: { + serializedName: "ipv4Routes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StaticRouteProperties" + } + } + } + }, + ipv6Routes: { + serializedName: "ipv6Routes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StaticRouteProperties" + } + } + } + } + } + } +}; + +export const BfdConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BfdConfiguration", + modelProperties: { + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + interval: { + serializedName: "interval", + readOnly: true, + type: { + name: "Number" + } + }, + multiplier: { + serializedName: "multiplier", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const StaticRouteProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StaticRouteProperties", + modelProperties: { + prefix: { + serializedName: "prefix", + required: true, + type: { + name: "String" + } + }, + nextHop: { + serializedName: "nextHop", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const NeighborAddress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NeighborAddress", + modelProperties: { + address: { + serializedName: "address", + type: { + name: "String" + } + }, + operationalState: { + serializedName: "operationalState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworkPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworkPatch", + modelProperties: { + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + mtu: { + defaultValue: 1500, + constraints: { + InclusiveMaximum: 9000, + InclusiveMinimum: 1500 + }, + serializedName: "properties.mtu", + type: { + name: "Number" + } + }, + connectedIPv4Subnets: { + serializedName: "properties.connectedIPv4Subnets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedSubnet" + } + } + } + }, + connectedIPv6Subnets: { + serializedName: "properties.connectedIPv6Subnets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedSubnet" + } + } + } + }, + staticRouteConfiguration: { + serializedName: "properties.staticRouteConfiguration", + type: { + name: "Composite", + className: "StaticRouteConfiguration" + } + }, + bgpConfiguration: { + serializedName: "properties.bgpConfiguration", + type: { + name: "Composite", + className: "BgpConfiguration" + } + }, + importRoutePolicyId: { + serializedName: "properties.importRoutePolicyId", + type: { + name: "String" + } + }, + exportRoutePolicyId: { + serializedName: "properties.exportRoutePolicyId", + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworksList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworksList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InternalNetwork" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OptionBProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OptionBProperties", + modelProperties: { + importRouteTargets: { + serializedName: "importRouteTargets", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + exportRouteTargets: { + serializedName: "exportRouteTargets", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Layer3IpPrefixProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Layer3IpPrefixProperties", + modelProperties: { + primaryIpv4Prefix: { + serializedName: "primaryIpv4Prefix", + type: { + name: "String" + } + }, + primaryIpv6Prefix: { + serializedName: "primaryIpv6Prefix", + type: { + name: "String" + } + }, + secondaryIpv4Prefix: { + serializedName: "secondaryIpv4Prefix", + type: { + name: "String" + } + }, + secondaryIpv6Prefix: { + serializedName: "secondaryIpv6Prefix", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworkPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworkPatch", + modelProperties: { + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + peeringOption: { + serializedName: "properties.peeringOption", + type: { + name: "String" + } + }, + optionBProperties: { + serializedName: "properties.optionBProperties", + type: { + name: "Composite", + className: "OptionBProperties" + } + }, + optionAProperties: { + serializedName: "properties.optionAProperties", + type: { + name: "Composite", + className: "Layer3OptionAProperties" + } + }, + importRoutePolicyId: { + serializedName: "properties.importRoutePolicyId", + type: { + name: "String" + } + }, + exportRoutePolicyId: { + serializedName: "properties.exportRoutePolicyId", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworkPatchableProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworkPatchableProperties", + modelProperties: { + peeringOption: { + serializedName: "peeringOption", + type: { + name: "String" + } + }, + optionBProperties: { + serializedName: "optionBProperties", + type: { + name: "Composite", + className: "OptionBProperties" + } + }, + optionAProperties: { + serializedName: "optionAProperties", + type: { + name: "Composite", + className: "Layer3OptionAProperties" + } + }, + importRoutePolicyId: { + serializedName: "importRoutePolicyId", + type: { + name: "String" + } + }, + exportRoutePolicyId: { + serializedName: "exportRoutePolicyId", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworksList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworksList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExternalNetwork" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SupportedVersionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SupportedVersionProperties", + modelProperties: { + version: { + serializedName: "version", + type: { + name: "String" + } + }, + vendorOsVersion: { + serializedName: "vendorOsVersion", + type: { + name: "String" + } + }, + vendorFirmwareVersion: { + serializedName: "vendorFirmwareVersion", + type: { + name: "String" + } + }, + isCurrent: { + serializedName: "isCurrent", + type: { + name: "String" + } + }, + isTest: { + serializedName: "isTest", + type: { + name: "String" + } + } + } + } +}; + +export const DeviceLimits: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeviceLimits", + modelProperties: { + physicalInterfaceCount: { + serializedName: "physicalInterfaceCount", + type: { + name: "Number" + } + }, + maxSubInterfaces: { + serializedName: "maxSubInterfaces", + type: { + name: "Number" + } + }, + maxTunnelInterfaces: { + serializedName: "maxTunnelInterfaces", + type: { + name: "Number" + } + }, + maxVirtualRouterFunctions: { + serializedName: "maxVirtualRouterFunctions", + type: { + name: "Number" + } + }, + maxBorderGatewayProtocolPeers: { + serializedName: "maxBorderGatewayProtocolPeers", + type: { + name: "Number" + } + }, + maxBidirectionalForwardingDetectionPeers: { + serializedName: "maxBidirectionalForwardingDetectionPeers", + type: { + name: "Number" + } + } + } + } +}; + +export const DeviceInterfaceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeviceInterfaceProperties", + modelProperties: { + identifier: { + serializedName: "identifier", + type: { + name: "String" + } + }, + interfaceType: { + serializedName: "interfaceType", + type: { + name: "String" + } + }, + supportedConnectorTypes: { + serializedName: "supportedConnectorTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SupportedConnectorProperties" + } + } + } + } + } + } +}; + +export const SupportedConnectorProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SupportedConnectorProperties", + modelProperties: { + connectorType: { + serializedName: "connectorType", + type: { + name: "String" + } + }, + maxSpeedInMbps: { + serializedName: "maxSpeedInMbps", + type: { + name: "Number" + } + } + } + } +}; + +export const NetworkDeviceSkusListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDeviceSkusListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkDeviceSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicePatchableProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicePatchableProperties", + modelProperties: { + hostName: { + serializedName: "hostName", + type: { + name: "String" + } + }, + serialNumber: { + serializedName: "serialNumber", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicePatchParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicePatchParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + hostName: { + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + serialNumber: { + serializedName: "properties.serialNumber", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkDevice" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterfacePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfacePatch", + modelProperties: { + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterfacesList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfacesList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkInterface" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateVersionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateVersionProperties", + modelProperties: { + skuVersion: { + serializedName: "skuVersion", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SupportPackageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SupportPackageProperties", + modelProperties: { + supportPackageURL: { + serializedName: "supportPackageURL", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const UpdatePowerCycleProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdatePowerCycleProperties", + modelProperties: { + powerEnd: { + serializedName: "powerEnd", + required: true, + type: { + name: "String" + } + }, + state: { + serializedName: "state", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const GetDeviceStatusProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetDeviceStatusProperties", + modelProperties: { + operationalStatus: { + serializedName: "operationalStatus", + required: true, + type: { + name: "String" + } + }, + powerCycleState: { + serializedName: "powerCycleState", + required: true, + type: { + name: "String" + } + }, + serialNumber: { + serializedName: "serialNumber", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const GetStaticInterfaceMapsPropertiesItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetStaticInterfaceMapsPropertiesItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + identifier: { + serializedName: "identifier", + type: { + name: "String" + } + }, + interfaceType: { + serializedName: "interfaceType", + type: { + name: "String" + } + }, + connectorType: { + serializedName: "connectorType", + type: { + name: "String" + } + }, + connectedTo: { + serializedName: "connectedTo", + type: { + name: "String" + } + }, + speed: { + serializedName: "speed", + type: { + name: "Number" + } + }, + channelGroupId: { + serializedName: "channelGroupId", + type: { + name: "Number" + } + } + } + } +}; + +export const InterfaceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InterfaceStatus", + modelProperties: { + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + operationalStatus: { + serializedName: "operationalStatus", + type: { + name: "String" + } + }, + phyStatus: { + serializedName: "phyStatus", + type: { + name: "String" + } + }, + transceiverStatus: { + serializedName: "transceiverStatus", + type: { + name: "String" + } + }, + connectedTo: { + serializedName: "connectedTo", + type: { + name: "String" + } + } + } + } +}; + +export const InfrastructureServices: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InfrastructureServices", + modelProperties: { + ipv4AddressSpaces: { + serializedName: "ipv4AddressSpaces", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ipv6AddressSpaces: { + serializedName: "ipv6AddressSpaces", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const WorkloadServices: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadServices", + modelProperties: { + ipv4AddressSpaces: { + serializedName: "ipv4AddressSpaces", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ipv6AddressSpaces: { + serializedName: "ipv6AddressSpaces", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ManagedResourceGroupConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedResourceGroupConfiguration", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricControllerPatchableProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricControllerPatchableProperties", + modelProperties: { + infrastructureExpressRouteConnections: { + serializedName: "infrastructureExpressRouteConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteConnectionInformation" + } + } + } + }, + workloadExpressRouteConnections: { + serializedName: "workloadExpressRouteConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteConnectionInformation" + } + } + } + } + } + } +}; + +export const ExpressRouteConnectionInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRouteConnectionInformation", + modelProperties: { + expressRouteCircuitId: { + serializedName: "expressRouteCircuitId", + required: true, + type: { + name: "String" + } + }, + expressRouteAuthorizationKey: { + serializedName: "expressRouteAuthorizationKey", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricControllerPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricControllerPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + infrastructureExpressRouteConnections: { + serializedName: "properties.infrastructureExpressRouteConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteConnectionInformation" + } + } + } + }, + workloadExpressRouteConnections: { + serializedName: "properties.workloadExpressRouteConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteConnectionInformation" + } + } + } + } + } + } +}; + +export const NetworkFabricControllersListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricControllersListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkFabricController" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricSkusListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricSkusListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkFabricSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TerminalServerPatchableProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TerminalServerPatchableProperties", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + }, + serialNumber: { + serializedName: "serialNumber", + type: { + name: "String" + } + } + } + } +}; + +export const ManagementNetworkConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagementNetworkConfiguration", + modelProperties: { + infrastructureVpnConfiguration: { + serializedName: "infrastructureVpnConfiguration", + type: { + name: "Composite", + className: "VpnConfigurationProperties" + } + }, + workloadVpnConfiguration: { + serializedName: "workloadVpnConfiguration", + type: { + name: "Composite", + className: "VpnConfigurationProperties" + } + } + } + } +}; + +export const VpnConfigurationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VpnConfigurationProperties", + modelProperties: { + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + networkToNetworkInterconnectId: { + serializedName: "networkToNetworkInterconnectId", + readOnly: true, + type: { + name: "String" + } + }, + peeringOption: { + serializedName: "peeringOption", + required: true, + type: { + name: "String" + } + }, + optionBProperties: { + serializedName: "optionBProperties", + type: { + name: "Composite", + className: "OptionBPropertiesAutoGenerated" + } + }, + optionAProperties: { + serializedName: "optionAProperties", + type: { + name: "Composite", + className: "OptionAProperties" + } + } + } + } +}; + +export const OptionBPropertiesAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OptionBPropertiesAutoGenerated", + modelProperties: { + importRouteTargets: { + serializedName: "importRouteTargets", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + exportRouteTargets: { + serializedName: "exportRouteTargets", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const FabricBfdConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FabricBfdConfiguration", + modelProperties: { + interval: { + serializedName: "interval", + readOnly: true, + type: { + name: "Number" + } + }, + multiplier: { + serializedName: "multiplier", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const NetworkFabricPatchableProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricPatchableProperties", + modelProperties: { + racks: { + serializedName: "racks", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + l2IsolationDomains: { + serializedName: "l2IsolationDomains", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + l3IsolationDomains: { + serializedName: "l3IsolationDomains", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const NetworkFabricPatchParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricPatchParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + terminalServerConfiguration: { + serializedName: "properties.terminalServerConfiguration", + type: { + name: "Composite", + className: "TerminalServerPatchableProperties" + } + }, + racks: { + serializedName: "properties.racks", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + l2IsolationDomains: { + serializedName: "properties.l2IsolationDomains", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + l3IsolationDomains: { + serializedName: "properties.l3IsolationDomains", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TerminalServerPatchParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TerminalServerPatchParameters", + modelProperties: { + terminalServerConfiguration: { + serializedName: "terminalServerConfiguration", + type: { + name: "Composite", + className: "TerminalServerPatchableProperties" + } + } + } + } +}; + +export const NetworkFabricsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkFabric" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const Layer2Configuration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Layer2Configuration", + modelProperties: { + portCount: { + serializedName: "portCount", + type: { + name: "Number" + } + }, + mtu: { + defaultValue: 1500, + constraints: { + InclusiveMaximum: 9000, + InclusiveMinimum: 1500 + }, + serializedName: "mtu", + required: true, + type: { + name: "Number" + } + }, + interfaces: { + serializedName: "interfaces", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const NetworkToNetworkInterconnectsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkToNetworkInterconnectsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkToNetworkInterconnect" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDeviceRoleProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDeviceRoleProperties", + modelProperties: { + networkDeviceSkuName: { + serializedName: "networkDeviceSkuName", + type: { + name: "String" + } + }, + roleType: { + serializedName: "roleType", + type: { + name: "String" + } + }, + rackSlot: { + serializedName: "rackSlot", + type: { + name: "Number" + } + } + } + } +}; + +export const NetworkRackSkusListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkRackSkusListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkRackSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkRackPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkRackPatch", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const NetworkRacksListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkRacksListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkRack" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IpCommunityIdList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunityIdList", + modelProperties: { + ipCommunityIds: { + serializedName: "ipCommunityIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const IpExtendedCommunityIdList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunityIdList", + modelProperties: { + ipExtendedCommunityIds: { + serializedName: "ipExtendedCommunityIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const StatementActionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StatementActionProperties", + modelProperties: { + localPreference: { + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 0 + }, + serializedName: "localPreference", + type: { + name: "Number" + } + }, + actionType: { + serializedName: "actionType", + required: true, + type: { + name: "String" + } + }, + ipCommunityProperties: { + serializedName: "ipCommunityProperties", + type: { + name: "Composite", + className: "ActionIpCommunityProperties" + } + }, + ipExtendedCommunityProperties: { + serializedName: "ipExtendedCommunityProperties", + type: { + name: "Composite", + className: "ActionIpExtendedCommunityProperties" + } + } + } + } +}; + +export const IpCommunityAddOperationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunityAddOperationProperties", + modelProperties: { + add: { + serializedName: "add", + type: { + name: "Composite", + className: "IpCommunityIdList" + } + } + } + } +}; + +export const IpCommunityDeleteOperationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunityDeleteOperationProperties", + modelProperties: { + delete: { + serializedName: "delete", + type: { + name: "Composite", + className: "IpCommunityIdList" + } + } + } + } +}; + +export const IpCommunitySetOperationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunitySetOperationProperties", + modelProperties: { + set: { + serializedName: "set", + type: { + name: "Composite", + className: "IpCommunityIdList" + } + } + } + } +}; + +export const IpExtendedCommunityAddOperationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunityAddOperationProperties", + modelProperties: { + add: { + serializedName: "add", + type: { + name: "Composite", + className: "IpExtendedCommunityIdList" + } + } + } + } +}; + +export const IpExtendedCommunityDeleteOperationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunityDeleteOperationProperties", + modelProperties: { + delete: { + serializedName: "delete", + type: { + name: "Composite", + className: "IpExtendedCommunityIdList" + } + } + } + } +}; + +export const IpExtendedCommunitySetOperationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunitySetOperationProperties", + modelProperties: { + set: { + serializedName: "set", + type: { + name: "Composite", + className: "IpExtendedCommunityIdList" + } + } + } + } +}; + +export const RoutePolicyPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutePolicyPatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const RoutePoliciesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutePoliciesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoutePolicy" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ExpressRouteStatusDef: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRouteStatusDef", + modelProperties: { + expressRouteCircuitId: { + serializedName: "expressRouteCircuitId", + type: { + name: "String" + } + }, + expressRouteStatus: { + serializedName: "expressRouteStatus", + type: { + name: "String" + } + } + } + } +}; + +export const ExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const AccessControlListConditionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlListConditionProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + sequenceNumber: { + serializedName: "sequenceNumber", + required: true, + type: { + name: "Number" + } + }, + action: { + serializedName: "action", + required: true, + type: { + name: "String" + } + }, + destinationAddress: { + serializedName: "destinationAddress", + required: true, + type: { + name: "String" + } + }, + destinationPort: { + serializedName: "destinationPort", + required: true, + type: { + name: "String" + } + }, + sourceAddress: { + serializedName: "sourceAddress", + required: true, + type: { + name: "String" + } + }, + sourcePort: { + serializedName: "sourcePort", + required: true, + type: { + name: "String" + } + }, + protocol: { + serializedName: "protocol", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const AccessControlListProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlListProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + addressFamily: { + serializedName: "addressFamily", + required: true, + type: { + name: "String" + } + }, + conditions: { + serializedName: "conditions", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlListConditionProperties" + } + } + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AccessControlListPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlListPatchProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + addressFamily: { + serializedName: "addressFamily", + type: { + name: "String" + } + }, + conditions: { + serializedName: "conditions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlListConditionProperties" + } + } + } + } + } + } +}; + +export const IpCommunityProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunityProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + action: { + serializedName: "action", + required: true, + type: { + name: "String" + } + }, + wellKnownCommunities: { + constraints: { + UniqueItems: true + }, + serializedName: "wellKnownCommunities", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + communityMembers: { + serializedName: "communityMembers", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IpExtendedCommunityProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunityProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + action: { + serializedName: "action", + required: true, + type: { + name: "String" + } + }, + routeTargets: { + serializedName: "routeTargets", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IpPrefixProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpPrefixProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ipPrefixRules: { + serializedName: "ipPrefixRules", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpPrefixPropertiesIpPrefixRulesItem" + } + } + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + networkFabricId: { + serializedName: "networkFabricId", + required: true, + type: { + name: "String" + } + }, + vlanId: { + serializedName: "vlanId", + required: true, + type: { + name: "Number" + } + }, + mtu: { + serializedName: "mtu", + type: { + name: "Number" + } + }, + disabledOnResources: { + serializedName: "disabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainPatchProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + mtu: { + serializedName: "mtu", + type: { + name: "Number" + } + } + } + } +}; + +export const L3IsolationDomainProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...L3IsolationDomainPatchProperties.type.modelProperties, + networkFabricId: { + serializedName: "networkFabricId", + required: true, + type: { + name: "String" + } + }, + disabledOnResources: { + serializedName: "disabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + optionBDisabledOnResources: { + serializedName: "optionBDisabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedSubnet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedSubnet", + modelProperties: { + ...AnnotationResource.type.modelProperties, + prefix: { + serializedName: "prefix", + type: { + name: "String" + } + } + } + } +}; + +export const BgpConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BgpConfiguration", + modelProperties: { + ...AnnotationResource.type.modelProperties, + bfdConfiguration: { + serializedName: "bfdConfiguration", + type: { + name: "Composite", + className: "BfdConfiguration" + } + }, + defaultRouteOriginate: { + serializedName: "defaultRouteOriginate", + type: { + name: "String" + } + }, + allowAS: { + defaultValue: 2, + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 0 + }, + serializedName: "allowAS", + type: { + name: "Number" + } + }, + allowASOverride: { + serializedName: "allowASOverride", + type: { + name: "String" + } + }, + fabricASN: { + serializedName: "fabricASN", + readOnly: true, + type: { + name: "Number" + } + }, + peerASN: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "peerASN", + required: true, + type: { + name: "Number" + } + }, + ipv4ListenRangePrefixes: { + serializedName: "ipv4ListenRangePrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ipv6ListenRangePrefixes: { + serializedName: "ipv6ListenRangePrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ipv4NeighborAddress: { + serializedName: "ipv4NeighborAddress", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NeighborAddress" + } + } + } + }, + ipv6NeighborAddress: { + serializedName: "ipv6NeighborAddress", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NeighborAddress" + } + } + } + } + } + } +}; + +export const InternalNetworkProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworkProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...InternalNetworkPatchableProperties.type.modelProperties, + disabledOnResources: { + serializedName: "disabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + bgpDisabledOnResources: { + serializedName: "bgpDisabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + bfdDisabledOnResources: { + serializedName: "bfdDisabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + bfdForStaticRoutesDisabledOnResources: { + serializedName: "bfdForStaticRoutesDisabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + vlanId: { + constraints: { + InclusiveMaximum: 4095, + InclusiveMinimum: 100 + }, + serializedName: "vlanId", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const InternalNetworkPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworkPatchProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...InternalNetworkPatchableProperties.type.modelProperties + } + } +}; + +export const ExternalNetworkProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworkProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + networkToNetworkInterconnectId: { + serializedName: "networkToNetworkInterconnectId", + readOnly: true, + type: { + name: "String" + } + }, + disabledOnResources: { + serializedName: "disabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + peeringOption: { + serializedName: "peeringOption", + required: true, + type: { + name: "String" + } + }, + optionBProperties: { + serializedName: "optionBProperties", + type: { + name: "Composite", + className: "OptionBProperties" + } + }, + optionAProperties: { + serializedName: "optionAProperties", + type: { + name: "Composite", + className: "ExternalNetworkPropertiesOptionAProperties" + } + }, + importRoutePolicyId: { + serializedName: "importRoutePolicyId", + type: { + name: "String" + } + }, + exportRoutePolicyId: { + serializedName: "exportRoutePolicyId", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworkPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworkPatchProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...ExternalNetworkPatchableProperties.type.modelProperties + } + } +}; + +export const NetworkDeviceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDeviceProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...NetworkDevicePatchableProperties.type.modelProperties, + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String" + } + }, + networkDeviceSku: { + serializedName: "networkDeviceSku", + required: true, + type: { + name: "String" + } + }, + networkDeviceRole: { + serializedName: "networkDeviceRole", + required: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + networkRackId: { + serializedName: "networkRackId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicePatchParametersProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicePatchParametersProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...NetworkDevicePatchableProperties.type.modelProperties + } + } +}; + +export const NetworkInterfaceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfaceProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + physicalIdentifier: { + serializedName: "physicalIdentifier", + readOnly: true, + type: { + name: "String" + } + }, + administrativeState: { + serializedName: "administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + connectedTo: { + serializedName: "connectedTo", + readOnly: true, + type: { + name: "String" + } + }, + interfaceType: { + serializedName: "interfaceType", + readOnly: true, + type: { + name: "String" + } + }, + ipv4Address: { + serializedName: "ipv4Address", + readOnly: true, + type: { + name: "String" + } + }, + ipv6Address: { + serializedName: "ipv6Address", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterfacePatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfacePatchProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties + } + } +}; + +export const NetworkFabricControllerProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricControllerProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...NetworkFabricControllerPatchableProperties.type.modelProperties, + infrastructureServices: { + serializedName: "infrastructureServices", + type: { + name: "Composite", + className: "InfrastructureServices" + } + }, + workloadServices: { + serializedName: "workloadServices", + type: { + name: "Composite", + className: "WorkloadServices" + } + }, + managedResourceGroupConfiguration: { + serializedName: "managedResourceGroupConfiguration", + type: { + name: "Composite", + className: "ManagedResourceGroupConfiguration" + } + }, + networkFabricIds: { + serializedName: "networkFabricIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + workloadManagementNetwork: { + defaultValue: true, + serializedName: "workloadManagementNetwork", + readOnly: true, + type: { + name: "Boolean" + } + }, + ipv4AddressSpace: { + serializedName: "ipv4AddressSpace", + type: { + name: "String" + } + }, + ipv6AddressSpace: { + serializedName: "ipv6AddressSpace", + type: { + name: "String" + } + }, + operationalState: { + serializedName: "operationalState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...NetworkFabricPatchableProperties.type.modelProperties, + networkFabricSku: { + serializedName: "networkFabricSku", + required: true, + type: { + name: "String" + } + }, + rackCount: { + constraints: { + InclusiveMaximum: 8, + InclusiveMinimum: 2 + }, + serializedName: "rackCount", + required: true, + type: { + name: "Number" + } + }, + serverCountPerRack: { + constraints: { + InclusiveMaximum: 16, + InclusiveMinimum: 1 + }, + serializedName: "serverCountPerRack", + required: true, + type: { + name: "Number" + } + }, + ipv4Prefix: { + serializedName: "ipv4Prefix", + type: { + name: "String" + } + }, + ipv6Prefix: { + serializedName: "ipv6Prefix", + type: { + name: "String" + } + }, + routerId: { + serializedName: "routerId", + readOnly: true, + type: { + name: "String" + } + }, + fabricASN: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "fabricASN", + required: true, + type: { + name: "Number" + } + }, + networkFabricControllerId: { + serializedName: "networkFabricControllerId", + required: true, + type: { + name: "String" + } + }, + terminalServerConfiguration: { + serializedName: "terminalServerConfiguration", + type: { + name: "Composite", + className: "TerminalServerConfiguration" + } + }, + managementNetworkConfiguration: { + serializedName: "managementNetworkConfiguration", + type: { + name: "Composite", + className: "ManagementNetworkConfiguration" + } + }, + operationalState: { + serializedName: "operationalState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricPatchParametersProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricPatchParametersProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + ...TerminalServerPatchParameters.type.modelProperties, + ...NetworkFabricPatchableProperties.type.modelProperties + } + } +}; + +export const NetworkRackProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkRackProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + networkRackSku: { + serializedName: "networkRackSku", + required: true, + type: { + name: "String" + } + }, + networkFabricId: { + serializedName: "networkFabricId", + required: true, + type: { + name: "String" + } + }, + networkDevices: { + serializedName: "networkDevices", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const RoutePolicyStatementProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutePolicyStatementProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + sequenceNumber: { + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 1 + }, + serializedName: "sequenceNumber", + required: true, + type: { + name: "Number" + } + }, + condition: { + serializedName: "condition", + type: { + name: "Composite", + className: "StatementConditionProperties" + } + }, + action: { + serializedName: "action", + type: { + name: "Composite", + className: "StatementActionProperties" + } + } + } + } +}; + +export const RoutePolicyProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutePolicyProperties", + modelProperties: { + ...AnnotationResource.type.modelProperties, + statements: { + serializedName: "statements", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoutePolicyStatementProperties" + } + } + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const UpdateAdministrativeState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateAdministrativeState", + modelProperties: { + ...EnableDisableOnResources.type.modelProperties, + state: { + serializedName: "state", + type: { + name: "String" + } + } + } + } +}; + +export const Layer3OptionAProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Layer3OptionAProperties", + modelProperties: { + ...Layer3IpPrefixProperties.type.modelProperties, + mtu: { + defaultValue: 1500, + constraints: { + InclusiveMaximum: 9000, + InclusiveMinimum: 1500 + }, + serializedName: "mtu", + type: { + name: "Number" + } + }, + vlanId: { + constraints: { + InclusiveMaximum: 4095, + InclusiveMinimum: 501 + }, + serializedName: "vlanId", + type: { + name: "Number" + } + }, + fabricASN: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "fabricASN", + readOnly: true, + type: { + name: "Number" + } + }, + peerASN: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "peerASN", + type: { + name: "Number" + } + }, + bfdConfiguration: { + serializedName: "bfdConfiguration", + type: { + name: "Composite", + className: "BfdConfiguration" + } + } + } + } +}; + +export const TerminalServerConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TerminalServerConfiguration", + modelProperties: { + ...Layer3IpPrefixProperties.type.modelProperties, + ...TerminalServerPatchableProperties.type.modelProperties, + networkDeviceId: { + serializedName: "networkDeviceId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OptionAProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OptionAProperties", + modelProperties: { + ...Layer3IpPrefixProperties.type.modelProperties, + mtu: { + defaultValue: 1500, + constraints: { + InclusiveMaximum: 9000, + InclusiveMinimum: 1500 + }, + serializedName: "mtu", + type: { + name: "Number" + } + }, + vlanId: { + constraints: { + InclusiveMaximum: 4095, + InclusiveMinimum: 501 + }, + serializedName: "vlanId", + type: { + name: "Number" + } + }, + peerASN: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "peerASN", + type: { + name: "Number" + } + }, + bfdConfiguration: { + serializedName: "bfdConfiguration", + type: { + name: "Composite", + className: "FabricBfdConfiguration" + } + } + } + } +}; + +export const Layer3Configuration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Layer3Configuration", + modelProperties: { + ...Layer3IpPrefixProperties.type.modelProperties, + importRoutePolicyId: { + serializedName: "importRoutePolicyId", + type: { + name: "String" + } + }, + exportRoutePolicyId: { + serializedName: "exportRoutePolicyId", + type: { + name: "String" + } + }, + peerASN: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "peerASN", + type: { + name: "Number" + } + }, + vlanId: { + constraints: { + InclusiveMaximum: 4095, + InclusiveMinimum: 501 + }, + serializedName: "vlanId", + type: { + name: "Number" + } + }, + fabricASN: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "fabricASN", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const GetDynamicInterfaceMapsPropertiesItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GetDynamicInterfaceMapsPropertiesItem", + modelProperties: { + ...InterfaceStatus.type.modelProperties, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const StatementConditionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StatementConditionProperties", + modelProperties: { + ...IpCommunityIdList.type.modelProperties, + ...IpExtendedCommunityIdList.type.modelProperties, + ipPrefixId: { + serializedName: "ipPrefixId", + type: { + name: "String" + } + } + } + } +}; + +export const ActionIpCommunityProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActionIpCommunityProperties", + modelProperties: { + ...IpCommunityAddOperationProperties.type.modelProperties, + ...IpCommunityDeleteOperationProperties.type.modelProperties, + ...IpCommunitySetOperationProperties.type.modelProperties + } + } +}; + +export const ActionIpExtendedCommunityProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActionIpExtendedCommunityProperties", + modelProperties: { + ...IpExtendedCommunityAddOperationProperties.type.modelProperties, + ...IpExtendedCommunityDeleteOperationProperties.type.modelProperties, + ...IpExtendedCommunitySetOperationProperties.type.modelProperties + } + } +}; + +export const AccessControlList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessControlList", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + addressFamily: { + serializedName: "properties.addressFamily", + required: true, + type: { + name: "String" + } + }, + conditions: { + serializedName: "properties.conditions", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessControlListConditionProperties" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IpCommunity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunity", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + action: { + serializedName: "properties.action", + type: { + name: "String" + } + }, + wellKnownCommunities: { + constraints: { + UniqueItems: true + }, + serializedName: "properties.wellKnownCommunities", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + communityMembers: { + serializedName: "properties.communityMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IpExtendedCommunity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunity", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + action: { + serializedName: "properties.action", + type: { + name: "String" + } + }, + routeTargets: { + serializedName: "properties.routeTargets", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IpPrefix: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpPrefix", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + ipPrefixRules: { + serializedName: "properties.ipPrefixRules", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpPrefixPropertiesIpPrefixRulesItem" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomain: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomain", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + networkFabricId: { + serializedName: "properties.networkFabricId", + type: { + name: "String" + } + }, + vlanId: { + serializedName: "properties.vlanId", + type: { + name: "Number" + } + }, + mtu: { + serializedName: "properties.mtu", + type: { + name: "Number" + } + }, + disabledOnResources: { + serializedName: "properties.disabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + administrativeState: { + serializedName: "properties.administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomain: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomain", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + redistributeConnectedSubnets: { + defaultValue: "True", + serializedName: "properties.redistributeConnectedSubnets", + type: { + name: "String" + } + }, + redistributeStaticRoutes: { + defaultValue: "False", + serializedName: "properties.redistributeStaticRoutes", + type: { + name: "String" + } + }, + aggregateRouteConfiguration: { + serializedName: "properties.aggregateRouteConfiguration", + type: { + name: "Composite", + className: "AggregateRouteConfiguration" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + connectedSubnetRoutePolicy: { + serializedName: "properties.connectedSubnetRoutePolicy", + type: { + name: "Composite", + className: + "L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy" + } + }, + networkFabricId: { + serializedName: "properties.networkFabricId", + type: { + name: "String" + } + }, + disabledOnResources: { + serializedName: "properties.disabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + administrativeState: { + serializedName: "properties.administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + optionBDisabledOnResources: { + serializedName: "properties.optionBDisabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevice: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevice", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + hostName: { + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + serialNumber: { + serializedName: "properties.serialNumber", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + readOnly: true, + type: { + name: "String" + } + }, + networkDeviceSku: { + serializedName: "properties.networkDeviceSku", + type: { + name: "String" + } + }, + networkDeviceRole: { + serializedName: "properties.networkDeviceRole", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + networkRackId: { + serializedName: "properties.networkRackId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricController: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricController", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + infrastructureExpressRouteConnections: { + serializedName: "properties.infrastructureExpressRouteConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteConnectionInformation" + } + } + } + }, + workloadExpressRouteConnections: { + serializedName: "properties.workloadExpressRouteConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteConnectionInformation" + } + } + } + }, + infrastructureServices: { + serializedName: "properties.infrastructureServices", + type: { + name: "Composite", + className: "InfrastructureServices" + } + }, + workloadServices: { + serializedName: "properties.workloadServices", + type: { + name: "Composite", + className: "WorkloadServices" + } + }, + managedResourceGroupConfiguration: { + serializedName: "properties.managedResourceGroupConfiguration", + type: { + name: "Composite", + className: "ManagedResourceGroupConfiguration" + } + }, + networkFabricIds: { + serializedName: "properties.networkFabricIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + workloadManagementNetwork: { + defaultValue: true, + serializedName: "properties.workloadManagementNetwork", + readOnly: true, + type: { + name: "Boolean" + } + }, + ipv4AddressSpace: { + serializedName: "properties.ipv4AddressSpace", + type: { + name: "String" + } + }, + ipv6AddressSpace: { + serializedName: "properties.ipv6AddressSpace", + type: { + name: "String" + } + }, + operationalState: { + serializedName: "properties.operationalState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabric: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabric", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + racks: { + serializedName: "properties.racks", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + l2IsolationDomains: { + serializedName: "properties.l2IsolationDomains", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + l3IsolationDomains: { + serializedName: "properties.l3IsolationDomains", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + networkFabricSku: { + serializedName: "properties.networkFabricSku", + type: { + name: "String" + } + }, + rackCount: { + constraints: { + InclusiveMaximum: 8, + InclusiveMinimum: 2 + }, + serializedName: "properties.rackCount", + type: { + name: "Number" + } + }, + serverCountPerRack: { + constraints: { + InclusiveMaximum: 16, + InclusiveMinimum: 1 + }, + serializedName: "properties.serverCountPerRack", + type: { + name: "Number" + } + }, + ipv4Prefix: { + serializedName: "properties.ipv4Prefix", + type: { + name: "String" + } + }, + ipv6Prefix: { + serializedName: "properties.ipv6Prefix", + type: { + name: "String" + } + }, + routerId: { + serializedName: "properties.routerId", + readOnly: true, + type: { + name: "String" + } + }, + fabricASN: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "properties.fabricASN", + type: { + name: "Number" + } + }, + networkFabricControllerId: { + serializedName: "properties.networkFabricControllerId", + type: { + name: "String" + } + }, + terminalServerConfiguration: { + serializedName: "properties.terminalServerConfiguration", + type: { + name: "Composite", + className: "TerminalServerConfiguration" + } + }, + managementNetworkConfiguration: { + serializedName: "properties.managementNetworkConfiguration", + type: { + name: "Composite", + className: "ManagementNetworkConfiguration" + } + }, + operationalState: { + serializedName: "properties.operationalState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkRack: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkRack", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + networkRackSku: { + serializedName: "properties.networkRackSku", + required: true, + type: { + name: "String" + } + }, + networkFabricId: { + serializedName: "properties.networkFabricId", + required: true, + type: { + name: "String" + } + }, + networkDevices: { + serializedName: "properties.networkDevices", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const RoutePolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutePolicy", + modelProperties: { + ...TrackedResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + statements: { + serializedName: "properties.statements", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoutePolicyStatementProperties" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetwork: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetwork", + modelProperties: { + ...ProxyResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + mtu: { + defaultValue: 1500, + constraints: { + InclusiveMaximum: 9000, + InclusiveMinimum: 1500 + }, + serializedName: "properties.mtu", + type: { + name: "Number" + } + }, + connectedIPv4Subnets: { + serializedName: "properties.connectedIPv4Subnets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedSubnet" + } + } + } + }, + connectedIPv6Subnets: { + serializedName: "properties.connectedIPv6Subnets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedSubnet" + } + } + } + }, + staticRouteConfiguration: { + serializedName: "properties.staticRouteConfiguration", + type: { + name: "Composite", + className: "StaticRouteConfiguration" + } + }, + bgpConfiguration: { + serializedName: "properties.bgpConfiguration", + type: { + name: "Composite", + className: "BgpConfiguration" + } + }, + importRoutePolicyId: { + serializedName: "properties.importRoutePolicyId", + type: { + name: "String" + } + }, + exportRoutePolicyId: { + serializedName: "properties.exportRoutePolicyId", + type: { + name: "String" + } + }, + disabledOnResources: { + serializedName: "properties.disabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + administrativeState: { + serializedName: "properties.administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + bgpDisabledOnResources: { + serializedName: "properties.bgpDisabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + bfdDisabledOnResources: { + serializedName: "properties.bfdDisabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + bfdForStaticRoutesDisabledOnResources: { + serializedName: "properties.bfdForStaticRoutesDisabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + vlanId: { + constraints: { + InclusiveMaximum: 4095, + InclusiveMinimum: 100 + }, + serializedName: "properties.vlanId", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ExternalNetwork: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetwork", + modelProperties: { + ...ProxyResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + networkToNetworkInterconnectId: { + serializedName: "properties.networkToNetworkInterconnectId", + readOnly: true, + type: { + name: "String" + } + }, + disabledOnResources: { + serializedName: "properties.disabledOnResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + administrativeState: { + serializedName: "properties.administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + peeringOption: { + serializedName: "properties.peeringOption", + required: true, + type: { + name: "String" + } + }, + optionBProperties: { + serializedName: "properties.optionBProperties", + type: { + name: "Composite", + className: "OptionBProperties" + } + }, + optionAProperties: { + serializedName: "properties.optionAProperties", + type: { + name: "Composite", + className: "ExternalNetworkPropertiesOptionAProperties" + } + }, + importRoutePolicyId: { + serializedName: "properties.importRoutePolicyId", + type: { + name: "String" + } + }, + exportRoutePolicyId: { + serializedName: "properties.exportRoutePolicyId", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDeviceSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDeviceSku", + modelProperties: { + ...ProxyResource.type.modelProperties, + model: { + serializedName: "properties.model", + required: true, + type: { + name: "String" + } + }, + manufacturer: { + serializedName: "properties.manufacturer", + type: { + name: "String" + } + }, + supportedVersions: { + serializedName: "properties.supportedVersions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SupportedVersionProperties" + } + } + } + }, + limits: { + serializedName: "properties.limits", + type: { + name: "Composite", + className: "DeviceLimits" + } + }, + supportedRoleTypes: { + serializedName: "properties.supportedRoleTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + interfaces: { + serializedName: "properties.interfaces", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeviceInterfaceProperties" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterface: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterface", + modelProperties: { + ...ProxyResource.type.modelProperties, + annotation: { + serializedName: "properties.annotation", + type: { + name: "String" + } + }, + physicalIdentifier: { + serializedName: "properties.physicalIdentifier", + readOnly: true, + type: { + name: "String" + } + }, + administrativeState: { + serializedName: "properties.administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + connectedTo: { + serializedName: "properties.connectedTo", + readOnly: true, + type: { + name: "String" + } + }, + interfaceType: { + serializedName: "properties.interfaceType", + readOnly: true, + type: { + name: "String" + } + }, + ipv4Address: { + serializedName: "properties.ipv4Address", + readOnly: true, + type: { + name: "String" + } + }, + ipv6Address: { + serializedName: "properties.ipv6Address", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricSku", + modelProperties: { + ...ProxyResource.type.modelProperties, + typePropertiesType: { + serializedName: "properties.type", + readOnly: true, + type: { + name: "String" + } + }, + maxComputeRacks: { + serializedName: "properties.maxComputeRacks", + type: { + name: "Number" + } + }, + minSupportedVer: { + serializedName: "properties.minSupportedVer", + readOnly: true, + type: { + name: "String" + } + }, + maxSupportedVer: { + serializedName: "properties.maxSupportedVer", + readOnly: true, + type: { + name: "String" + } + }, + detailsUri: { + serializedName: "properties.detailsUri", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkToNetworkInterconnect: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkToNetworkInterconnect", + modelProperties: { + ...ProxyResource.type.modelProperties, + nniType: { + defaultValue: "CE", + serializedName: "properties.nniType", + type: { + name: "String" + } + }, + administrativeState: { + serializedName: "properties.administrativeState", + readOnly: true, + type: { + name: "String" + } + }, + isManagementType: { + serializedName: "properties.isManagementType", + type: { + name: "String" + } + }, + useOptionB: { + serializedName: "properties.useOptionB", + type: { + name: "String" + } + }, + layer2Configuration: { + serializedName: "properties.layer2Configuration", + type: { + name: "Composite", + className: "Layer2Configuration" + } + }, + layer3Configuration: { + serializedName: "properties.layer3Configuration", + type: { + name: "Composite", + className: "Layer3Configuration" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NetworkRackSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkRackSku", + modelProperties: { + ...ProxyResource.type.modelProperties, + roleName: { + serializedName: "properties.roleName", + required: true, + type: { + name: "String" + } + }, + maximumServerCount: { + serializedName: "properties.maximumServerCount", + type: { + name: "Number" + } + }, + maximumStorageCount: { + serializedName: "properties.maximumStorageCount", + type: { + name: "Number" + } + }, + maximumUplinks: { + serializedName: "properties.maximumUplinks", + type: { + name: "Number" + } + }, + networkDevices: { + serializedName: "properties.networkDevices", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkDeviceRoleProperties" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworkPropertiesOptionAProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworkPropertiesOptionAProperties", + modelProperties: { + ...Layer3OptionAProperties.type.modelProperties + } + } +}; + +export const IpCommunitiesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunitiesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const IpCommunitiesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunitiesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const IpCommunitiesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpCommunitiesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const IpExtendedCommunitiesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunitiesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const IpExtendedCommunitiesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunitiesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const IpExtendedCommunitiesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpExtendedCommunitiesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const IpPrefixesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpPrefixesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const IpPrefixesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpPrefixesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const IpPrefixesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpPrefixesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainsUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainsUpdateAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainsUpdateAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainsClearArpTableHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainsClearArpTableHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainsClearNeighborTableHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainsClearNeighborTableHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const L2IsolationDomainsGetArpEntriesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L2IsolationDomainsGetArpEntriesHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomainsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainsUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomainsUpdateAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainsUpdateAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomainsClearArpTableHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainsClearArpTableHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const L3IsolationDomainsClearNeighborTableHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "L3IsolationDomainsClearNeighborTableHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworksUpdateAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworksUpdateAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworksUpdateBgpAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworksUpdateBgpAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworksClearIpv6NeighborsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworksClearIpv6NeighborsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworksClearArpEntriesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InternalNetworksClearArpEntriesHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworksUpdateAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworksUpdateAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworksUpdateBgpAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworksUpdateBgpAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworksClearIpv6NeighborsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworksClearIpv6NeighborsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ExternalNetworksClearArpEntriesHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExternalNetworksClearArpEntriesHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesRebootHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesRebootHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesRestoreConfigHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesRestoreConfigHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesUpdateVersionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesUpdateVersionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesGenerateSupportPackageHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesGenerateSupportPackageHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesUpdatePowerCycleHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesUpdatePowerCycleHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesGetStatusHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesGetStatusHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesGetStaticInterfaceMapsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesGetStaticInterfaceMapsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkDevicesGetDynamicInterfaceMapsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkDevicesGetDynamicInterfaceMapsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterfacesGetStatusHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfacesGetStatusHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkInterfacesUpdateAdministrativeStateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInterfacesUpdateAdministrativeStateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricControllersUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricControllersUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricControllersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricControllersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricControllersEnableWorkloadManagementNetworkHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricControllersEnableWorkloadManagementNetworkHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricControllersDisableWorkloadManagementNetworkHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "NetworkFabricControllersDisableWorkloadManagementNetworkHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricsProvisionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricsProvisionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkFabricsDeprovisionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkFabricsDeprovisionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkRacksUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkRacksUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const RoutePoliciesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoutePoliciesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/parameters.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/parameters.ts new file mode 100644 index 000000000000..eebb1610bcfc --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/models/parameters.ts @@ -0,0 +1,500 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + AccessControlList as AccessControlListMapper, + AccessControlListPatch as AccessControlListPatchMapper, + IpCommunity as IpCommunityMapper, + IpCommunityPatch as IpCommunityPatchMapper, + IpExtendedCommunity as IpExtendedCommunityMapper, + IpExtendedCommunityPatch as IpExtendedCommunityPatchMapper, + IpPrefix as IpPrefixMapper, + IpPrefixPatch as IpPrefixPatchMapper, + L2IsolationDomain as L2IsolationDomainMapper, + L2IsolationDomainPatch as L2IsolationDomainPatchMapper, + UpdateAdministrativeState as UpdateAdministrativeStateMapper, + EnableDisableOnResources as EnableDisableOnResourcesMapper, + L3IsolationDomain as L3IsolationDomainMapper, + L3IsolationDomainPatch as L3IsolationDomainPatchMapper, + InternalNetwork as InternalNetworkMapper, + InternalNetworkPatch as InternalNetworkPatchMapper, + ExternalNetwork as ExternalNetworkMapper, + ExternalNetworkPatch as ExternalNetworkPatchMapper, + NetworkDevice as NetworkDeviceMapper, + NetworkDevicePatchParameters as NetworkDevicePatchParametersMapper, + UpdateVersionProperties as UpdateVersionPropertiesMapper, + UpdatePowerCycleProperties as UpdatePowerCyclePropertiesMapper, + NetworkInterface as NetworkInterfaceMapper, + NetworkInterfacePatch as NetworkInterfacePatchMapper, + NetworkFabricController as NetworkFabricControllerMapper, + NetworkFabricControllerPatch as NetworkFabricControllerPatchMapper, + NetworkFabric as NetworkFabricMapper, + NetworkFabricPatchParameters as NetworkFabricPatchParametersMapper, + NetworkToNetworkInterconnect as NetworkToNetworkInterconnectMapper, + NetworkRack as NetworkRackMapper, + NetworkRackPatch as NetworkRackPatchMapper, + RoutePolicy as RoutePolicyMapper, + RoutePolicyPatch as RoutePolicyPatchMapper +} from "../models/mappers"; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const body: OperationParameter = { + parameterPath: "body", + mapper: AccessControlListMapper +}; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2023-02-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const accessControlListName: OperationURLParameter = { + parameterPath: "accessControlListName", + mapper: { + serializedName: "accessControlListName", + required: true, + type: { + name: "String" + } + } +}; + +export const body1: OperationParameter = { + parameterPath: "body", + mapper: AccessControlListPatchMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const body2: OperationParameter = { + parameterPath: "body", + mapper: IpCommunityMapper +}; + +export const ipCommunityName: OperationURLParameter = { + parameterPath: "ipCommunityName", + mapper: { + serializedName: "ipCommunityName", + required: true, + type: { + name: "String" + } + } +}; + +export const body3: OperationParameter = { + parameterPath: "body", + mapper: IpCommunityPatchMapper +}; + +export const body4: OperationParameter = { + parameterPath: "body", + mapper: IpExtendedCommunityMapper +}; + +export const ipExtendedCommunityName: OperationURLParameter = { + parameterPath: "ipExtendedCommunityName", + mapper: { + serializedName: "ipExtendedCommunityName", + required: true, + type: { + name: "String" + } + } +}; + +export const body5: OperationParameter = { + parameterPath: "body", + mapper: IpExtendedCommunityPatchMapper +}; + +export const body6: OperationParameter = { + parameterPath: "body", + mapper: IpPrefixMapper +}; + +export const ipPrefixName: OperationURLParameter = { + parameterPath: "ipPrefixName", + mapper: { + serializedName: "ipPrefixName", + required: true, + type: { + name: "String" + } + } +}; + +export const body7: OperationParameter = { + parameterPath: "body", + mapper: IpPrefixPatchMapper +}; + +export const body8: OperationParameter = { + parameterPath: "body", + mapper: L2IsolationDomainMapper +}; + +export const l2IsolationDomainName: OperationURLParameter = { + parameterPath: "l2IsolationDomainName", + mapper: { + serializedName: "l2IsolationDomainName", + required: true, + type: { + name: "String" + } + } +}; + +export const body9: OperationParameter = { + parameterPath: "body", + mapper: L2IsolationDomainPatchMapper +}; + +export const body10: OperationParameter = { + parameterPath: "body", + mapper: UpdateAdministrativeStateMapper +}; + +export const body11: OperationParameter = { + parameterPath: "body", + mapper: EnableDisableOnResourcesMapper +}; + +export const body12: OperationParameter = { + parameterPath: "body", + mapper: L3IsolationDomainMapper +}; + +export const l3IsolationDomainName: OperationURLParameter = { + parameterPath: "l3IsolationDomainName", + mapper: { + serializedName: "l3IsolationDomainName", + required: true, + type: { + name: "String" + } + } +}; + +export const body13: OperationParameter = { + parameterPath: "body", + mapper: L3IsolationDomainPatchMapper +}; + +export const body14: OperationParameter = { + parameterPath: "body", + mapper: InternalNetworkMapper +}; + +export const internalNetworkName: OperationURLParameter = { + parameterPath: "internalNetworkName", + mapper: { + serializedName: "internalNetworkName", + required: true, + type: { + name: "String" + } + } +}; + +export const body15: OperationParameter = { + parameterPath: "body", + mapper: InternalNetworkPatchMapper +}; + +export const body16: OperationParameter = { + parameterPath: "body", + mapper: ExternalNetworkMapper +}; + +export const externalNetworkName: OperationURLParameter = { + parameterPath: "externalNetworkName", + mapper: { + serializedName: "externalNetworkName", + required: true, + type: { + name: "String" + } + } +}; + +export const body17: OperationParameter = { + parameterPath: "body", + mapper: ExternalNetworkPatchMapper +}; + +export const networkDeviceSkuName: OperationURLParameter = { + parameterPath: "networkDeviceSkuName", + mapper: { + serializedName: "networkDeviceSkuName", + required: true, + type: { + name: "String" + } + } +}; + +export const body18: OperationParameter = { + parameterPath: "body", + mapper: NetworkDeviceMapper +}; + +export const networkDeviceName: OperationURLParameter = { + parameterPath: "networkDeviceName", + mapper: { + serializedName: "networkDeviceName", + required: true, + type: { + name: "String" + } + } +}; + +export const body19: OperationParameter = { + parameterPath: "body", + mapper: NetworkDevicePatchParametersMapper +}; + +export const body20: OperationParameter = { + parameterPath: "body", + mapper: UpdateVersionPropertiesMapper +}; + +export const body21: OperationParameter = { + parameterPath: "body", + mapper: UpdatePowerCyclePropertiesMapper +}; + +export const body22: OperationParameter = { + parameterPath: "body", + mapper: NetworkInterfaceMapper +}; + +export const networkInterfaceName: OperationURLParameter = { + parameterPath: "networkInterfaceName", + mapper: { + serializedName: "networkInterfaceName", + required: true, + type: { + name: "String" + } + } +}; + +export const body23: OperationParameter = { + parameterPath: "body", + mapper: NetworkInterfacePatchMapper +}; + +export const body24: OperationParameter = { + parameterPath: "body", + mapper: NetworkFabricControllerMapper +}; + +export const networkFabricControllerName: OperationURLParameter = { + parameterPath: "networkFabricControllerName", + mapper: { + serializedName: "networkFabricControllerName", + required: true, + type: { + name: "String" + } + } +}; + +export const body25: OperationParameter = { + parameterPath: "body", + mapper: NetworkFabricControllerPatchMapper +}; + +export const networkFabricSkuName: OperationURLParameter = { + parameterPath: "networkFabricSkuName", + mapper: { + serializedName: "networkFabricSkuName", + required: true, + type: { + name: "String" + } + } +}; + +export const body26: OperationParameter = { + parameterPath: "body", + mapper: NetworkFabricMapper +}; + +export const networkFabricName: OperationURLParameter = { + parameterPath: "networkFabricName", + mapper: { + serializedName: "networkFabricName", + required: true, + type: { + name: "String" + } + } +}; + +export const body27: OperationParameter = { + parameterPath: "body", + mapper: NetworkFabricPatchParametersMapper +}; + +export const body28: OperationParameter = { + parameterPath: "body", + mapper: NetworkToNetworkInterconnectMapper +}; + +export const networkToNetworkInterconnectName: OperationURLParameter = { + parameterPath: "networkToNetworkInterconnectName", + mapper: { + serializedName: "networkToNetworkInterconnectName", + required: true, + type: { + name: "String" + } + } +}; + +export const networkRackSkuName: OperationURLParameter = { + parameterPath: "networkRackSkuName", + mapper: { + serializedName: "networkRackSkuName", + required: true, + type: { + name: "String" + } + } +}; + +export const body29: OperationParameter = { + parameterPath: "body", + mapper: NetworkRackMapper +}; + +export const networkRackName: OperationURLParameter = { + parameterPath: "networkRackName", + mapper: { + serializedName: "networkRackName", + required: true, + type: { + name: "String" + } + } +}; + +export const body30: OperationParameter = { + parameterPath: "body", + mapper: NetworkRackPatchMapper +}; + +export const body31: OperationParameter = { + parameterPath: "body", + mapper: RoutePolicyMapper +}; + +export const routePolicyName: OperationURLParameter = { + parameterPath: "routePolicyName", + mapper: { + serializedName: "routePolicyName", + required: true, + type: { + name: "String" + } + } +}; + +export const body32: OperationParameter = { + parameterPath: "body", + mapper: RoutePolicyPatchMapper +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/accessControlLists.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/accessControlLists.ts new file mode 100644 index 000000000000..be503edfe657 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/accessControlLists.ts @@ -0,0 +1,474 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { AccessControlLists } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + AccessControlList, + AccessControlListsListByResourceGroupNextOptionalParams, + AccessControlListsListByResourceGroupOptionalParams, + AccessControlListsListByResourceGroupResponse, + AccessControlListsListBySubscriptionNextOptionalParams, + AccessControlListsListBySubscriptionOptionalParams, + AccessControlListsListBySubscriptionResponse, + AccessControlListsCreateOptionalParams, + AccessControlListsCreateResponse, + AccessControlListsGetOptionalParams, + AccessControlListsGetResponse, + AccessControlListPatch, + AccessControlListsUpdateOptionalParams, + AccessControlListsUpdateResponse, + AccessControlListsDeleteOptionalParams, + AccessControlListsListByResourceGroupNextResponse, + AccessControlListsListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing AccessControlLists operations. */ +export class AccessControlListsImpl implements AccessControlLists { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class AccessControlLists class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Implements AccessControlLists list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: AccessControlListsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: AccessControlListsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AccessControlListsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: AccessControlListsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Implements AccessControlLists list by subscription GET method. + * @param options The options parameters. + */ + public listBySubscription( + options?: AccessControlListsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: AccessControlListsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AccessControlListsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: AccessControlListsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Implements Access Control List PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List + * @param body Request payload. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accessControlListName: string, + body: AccessControlList, + options?: AccessControlListsCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accessControlListName, body, options }, + createOperationSpec + ); + } + + /** + * Implements Access Control List GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accessControlListName: string, + options?: AccessControlListsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accessControlListName, options }, + getOperationSpec + ); + } + + /** + * API to update certain properties of the Access Control List resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List + * @param body Access Control List properties to update. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + accessControlListName: string, + body: AccessControlListPatch, + options?: AccessControlListsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accessControlListName, body, options }, + updateOperationSpec + ); + } + + /** + * Implements Access Control List DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + accessControlListName: string, + options?: AccessControlListsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accessControlListName, options }, + deleteOperationSpec + ); + } + + /** + * Implements AccessControlLists list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: AccessControlListsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Implements AccessControlLists list by subscription GET method. + * @param options The options parameters. + */ + private _listBySubscription( + options?: AccessControlListsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: AccessControlListsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: AccessControlListsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AccessControlList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accessControlListName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessControlList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accessControlListName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AccessControlList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accessControlListName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accessControlListName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessControlListsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessControlListsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessControlListsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AccessControlListsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/externalNetworks.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/externalNetworks.ts new file mode 100644 index 000000000000..1b8436ea5ee3 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/externalNetworks.ts @@ -0,0 +1,1385 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ExternalNetworks } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ExternalNetwork, + ExternalNetworksListNextOptionalParams, + ExternalNetworksListOptionalParams, + ExternalNetworksListResponse, + ExternalNetworksCreateOptionalParams, + ExternalNetworksCreateResponse, + ExternalNetworksGetOptionalParams, + ExternalNetworksGetResponse, + ExternalNetworkPatch, + ExternalNetworksUpdateOptionalParams, + ExternalNetworksUpdateResponse, + ExternalNetworksDeleteOptionalParams, + UpdateAdministrativeState, + ExternalNetworksUpdateAdministrativeStateOptionalParams, + ExternalNetworksUpdateAdministrativeStateResponse, + ExternalNetworksUpdateBgpAdministrativeStateOptionalParams, + ExternalNetworksUpdateBgpAdministrativeStateResponse, + ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams, + ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse, + EnableDisableOnResources, + ExternalNetworksClearIpv6NeighborsOptionalParams, + ExternalNetworksClearIpv6NeighborsResponse, + ExternalNetworksClearArpEntriesOptionalParams, + ExternalNetworksClearArpEntriesResponse, + ExternalNetworksListNextResponse +} from "../models"; + +/// +/** Class containing ExternalNetworks operations. */ +export class ExternalNetworksImpl implements ExternalNetworks { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class ExternalNetworks class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Implements External Networks list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: ExternalNetworksListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + l3IsolationDomainName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + l3IsolationDomainName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: ExternalNetworksListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ExternalNetworksListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + l3IsolationDomainName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + l3IsolationDomainName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: ExternalNetworksListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + l3IsolationDomainName, + options + )) { + yield* page; + } + } + + /** + * Creates ExternalNetwork PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: ExternalNetwork, + options?: ExternalNetworksCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ExternalNetworksCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates ExternalNetwork PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: ExternalNetwork, + options?: ExternalNetworksCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements ExternalNetworks GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param options The options parameters. + */ + get( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + options?: ExternalNetworksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + options + }, + getOperationSpec + ); + } + + /** + * API to update certain properties of the ExternalNetworks resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: ExternalNetworkPatch, + options?: ExternalNetworksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ExternalNetworksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * API to update certain properties of the ExternalNetworks resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: ExternalNetworkPatch, + options?: ExternalNetworksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements ExternalNetworks DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + options?: ExternalNetworksDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Implements ExternalNetworks DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + options?: ExternalNetworksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements External Networks list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: ExternalNetworksListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, l3IsolationDomainName, options }, + listOperationSpec + ); + } + + /** + * Executes update operation to enable or disable administrative State for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksUpdateAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + }, + spec: updateAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + ExternalNetworksUpdateAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Executes update operation to enable or disable administrative State for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update BGP for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBgpAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateBgpAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksUpdateBgpAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + }, + spec: updateBgpAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + ExternalNetworksUpdateBgpAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update BGP for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateBgpAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateBgpAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update BfdForBgp for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBfdForBgpAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse + >, + ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + }, + spec: updateBfdForBgpAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update BfdForBgp for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateBfdForBgpAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * clearIpv6Neighbors for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearIpv6Neighbors( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: EnableDisableOnResources, + options?: ExternalNetworksClearIpv6NeighborsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksClearIpv6NeighborsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + }, + spec: clearIpv6NeighborsOperationSpec + }); + const poller = await createHttpPoller< + ExternalNetworksClearIpv6NeighborsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * clearIpv6Neighbors for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearIpv6NeighborsAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: EnableDisableOnResources, + options?: ExternalNetworksClearIpv6NeighborsOptionalParams + ): Promise { + const poller = await this.beginClearIpv6Neighbors( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * clearArpEntries for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearArpEntries( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: EnableDisableOnResources, + options?: ExternalNetworksClearArpEntriesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksClearArpEntriesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + }, + spec: clearArpEntriesOperationSpec + }); + const poller = await createHttpPoller< + ExternalNetworksClearArpEntriesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * clearArpEntries for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearArpEntriesAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: EnableDisableOnResources, + options?: ExternalNetworksClearArpEntriesOptionalParams + ): Promise { + const poller = await this.beginClearArpEntries( + resourceGroupName, + l3IsolationDomainName, + externalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + l3IsolationDomainName: string, + nextLink: string, + options?: ExternalNetworksListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, l3IsolationDomainName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ExternalNetwork + }, + 201: { + bodyMapper: Mappers.ExternalNetwork + }, + 202: { + bodyMapper: Mappers.ExternalNetwork + }, + 204: { + bodyMapper: Mappers.ExternalNetwork + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body16, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExternalNetwork + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ExternalNetwork + }, + 201: { + bodyMapper: Mappers.ExternalNetwork + }, + 202: { + bodyMapper: Mappers.ExternalNetwork + }, + 204: { + bodyMapper: Mappers.ExternalNetwork + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body17, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExternalNetworksList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ExternalNetworksUpdateAdministrativeStateHeaders + }, + 201: { + headersMapper: Mappers.ExternalNetworksUpdateAdministrativeStateHeaders + }, + 202: { + headersMapper: Mappers.ExternalNetworksUpdateAdministrativeStateHeaders + }, + 204: { + headersMapper: Mappers.ExternalNetworksUpdateAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const updateBgpAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBgpAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ExternalNetworksUpdateBgpAdministrativeStateHeaders + }, + 201: { + headersMapper: Mappers.ExternalNetworksUpdateBgpAdministrativeStateHeaders + }, + 202: { + headersMapper: Mappers.ExternalNetworksUpdateBgpAdministrativeStateHeaders + }, + 204: { + headersMapper: Mappers.ExternalNetworksUpdateBgpAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const updateBfdForBgpAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdForBgpAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders + }, + 201: { + headersMapper: + Mappers.ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders + }, + 202: { + headersMapper: + Mappers.ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders + }, + 204: { + headersMapper: + Mappers.ExternalNetworksUpdateBfdForBgpAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const clearIpv6NeighborsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearIpv6Neighbors", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ExternalNetworksClearIpv6NeighborsHeaders + }, + 201: { + headersMapper: Mappers.ExternalNetworksClearIpv6NeighborsHeaders + }, + 202: { + headersMapper: Mappers.ExternalNetworksClearIpv6NeighborsHeaders + }, + 204: { + headersMapper: Mappers.ExternalNetworksClearIpv6NeighborsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const clearArpEntriesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearArpEntries", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ExternalNetworksClearArpEntriesHeaders + }, + 201: { + headersMapper: Mappers.ExternalNetworksClearArpEntriesHeaders + }, + 202: { + headersMapper: Mappers.ExternalNetworksClearArpEntriesHeaders + }, + 204: { + headersMapper: Mappers.ExternalNetworksClearArpEntriesHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.externalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExternalNetworksList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/index.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/index.ts new file mode 100644 index 000000000000..44f8aef51253 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/index.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./accessControlLists"; +export * from "./ipCommunities"; +export * from "./ipExtendedCommunities"; +export * from "./ipPrefixes"; +export * from "./l2IsolationDomains"; +export * from "./l3IsolationDomains"; +export * from "./internalNetworks"; +export * from "./externalNetworks"; +export * from "./networkDeviceSkus"; +export * from "./networkDevices"; +export * from "./networkInterfaces"; +export * from "./networkFabricControllers"; +export * from "./networkFabricSkus"; +export * from "./networkFabrics"; +export * from "./networkToNetworkInterconnects"; +export * from "./networkRackSkus"; +export * from "./networkRacks"; +export * from "./operations"; +export * from "./routePolicies"; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/internalNetworks.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/internalNetworks.ts new file mode 100644 index 000000000000..e1fcb542e0aa --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/internalNetworks.ts @@ -0,0 +1,1538 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { InternalNetworks } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + InternalNetwork, + InternalNetworksListNextOptionalParams, + InternalNetworksListOptionalParams, + InternalNetworksListResponse, + InternalNetworksCreateOptionalParams, + InternalNetworksCreateResponse, + InternalNetworksGetOptionalParams, + InternalNetworksGetResponse, + InternalNetworkPatch, + InternalNetworksUpdateOptionalParams, + InternalNetworksUpdateResponse, + InternalNetworksDeleteOptionalParams, + UpdateAdministrativeState, + InternalNetworksUpdateAdministrativeStateOptionalParams, + InternalNetworksUpdateAdministrativeStateResponse, + InternalNetworksUpdateBgpAdministrativeStateOptionalParams, + InternalNetworksUpdateBgpAdministrativeStateResponse, + InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams, + InternalNetworksUpdateBfdForBgpAdministrativeStateResponse, + EnableDisableOnResources, + InternalNetworksClearIpv6NeighborsOptionalParams, + InternalNetworksClearIpv6NeighborsResponse, + InternalNetworksClearArpEntriesOptionalParams, + InternalNetworksClearArpEntriesResponse, + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams, + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse, + InternalNetworksListNextResponse +} from "../models"; + +/// +/** Class containing InternalNetworks operations. */ +export class InternalNetworksImpl implements InternalNetworks { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class InternalNetworks class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Displays InternalNetworks list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: InternalNetworksListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + l3IsolationDomainName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + l3IsolationDomainName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: InternalNetworksListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: InternalNetworksListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + l3IsolationDomainName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + l3IsolationDomainName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: InternalNetworksListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + l3IsolationDomainName, + options + )) { + yield* page; + } + } + + /** + * Creates InternalNetwork PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: InternalNetwork, + options?: InternalNetworksCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + InternalNetworksCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates InternalNetwork PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: InternalNetwork, + options?: InternalNetworksCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets a InternalNetworks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param options The options parameters. + */ + get( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + options?: InternalNetworksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + options + }, + getOperationSpec + ); + } + + /** + * Updates a InternalNetworks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param body InternalNetwork properties to update. Only annotations are supported. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: InternalNetworkPatch, + options?: InternalNetworksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + InternalNetworksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Updates a InternalNetworks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param body InternalNetwork properties to update. Only annotations are supported. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: InternalNetworkPatch, + options?: InternalNetworksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements InternalNetworks DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + options?: InternalNetworksDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Implements InternalNetworks DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + options?: InternalNetworksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Displays InternalNetworks list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: InternalNetworksListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, l3IsolationDomainName, options }, + listOperationSpec + ); + } + + /** + * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksUpdateAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + }, + spec: updateAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + InternalNetworksUpdateAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update BGP state for internalNetwork. Allowed only on edge devices. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBgpAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBgpAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksUpdateBgpAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + }, + spec: updateBgpAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + InternalNetworksUpdateBgpAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update BGP state for internalNetwork. Allowed only on edge devices. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBgpAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateBgpAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update BfdForBgp for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBfdForBgpAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + InternalNetworksUpdateBfdForBgpAdministrativeStateResponse + >, + InternalNetworksUpdateBfdForBgpAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + }, + spec: updateBfdForBgpAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + InternalNetworksUpdateBfdForBgpAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update BfdForBgp for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateBfdForBgpAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * clearIpv6Neighbors for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearIpv6Neighbors( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: EnableDisableOnResources, + options?: InternalNetworksClearIpv6NeighborsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksClearIpv6NeighborsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + }, + spec: clearIpv6NeighborsOperationSpec + }); + const poller = await createHttpPoller< + InternalNetworksClearIpv6NeighborsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * clearIpv6Neighbors for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearIpv6NeighborsAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: EnableDisableOnResources, + options?: InternalNetworksClearIpv6NeighborsOptionalParams + ): Promise { + const poller = await this.beginClearIpv6Neighbors( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * clearArpEntries for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearArpEntries( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: EnableDisableOnResources, + options?: InternalNetworksClearArpEntriesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksClearArpEntriesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + }, + spec: clearArpEntriesOperationSpec + }); + const poller = await createHttpPoller< + InternalNetworksClearArpEntriesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * clearArpEntries for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearArpEntriesAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: EnableDisableOnResources, + options?: InternalNetworksClearArpEntriesOptionalParams + ): Promise { + const poller = await this.beginClearArpEntries( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update BfdForStaticRoutes for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBfdForStaticRouteAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse + >, + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + }, + spec: updateBfdForStaticRouteAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse, + OperationState< + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update BfdForStaticRoutes for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateBfdForStaticRouteAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams + ): Promise< + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse + > { + const poller = await this.beginUpdateBfdForStaticRouteAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + internalNetworkName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + l3IsolationDomainName: string, + nextLink: string, + options?: InternalNetworksListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, l3IsolationDomainName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.InternalNetwork + }, + 201: { + bodyMapper: Mappers.InternalNetwork + }, + 202: { + bodyMapper: Mappers.InternalNetwork + }, + 204: { + bodyMapper: Mappers.InternalNetwork + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body14, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.InternalNetwork + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.InternalNetwork + }, + 201: { + bodyMapper: Mappers.InternalNetwork + }, + 202: { + bodyMapper: Mappers.InternalNetwork + }, + 204: { + bodyMapper: Mappers.InternalNetwork + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body15, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.InternalNetworksList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.InternalNetworksUpdateAdministrativeStateHeaders + }, + 201: { + headersMapper: Mappers.InternalNetworksUpdateAdministrativeStateHeaders + }, + 202: { + headersMapper: Mappers.InternalNetworksUpdateAdministrativeStateHeaders + }, + 204: { + headersMapper: Mappers.InternalNetworksUpdateAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const updateBgpAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.InternalNetworksUpdateBgpAdministrativeStateHeaders + }, + 201: { + headersMapper: Mappers.InternalNetworksUpdateBgpAdministrativeStateHeaders + }, + 202: { + headersMapper: Mappers.InternalNetworksUpdateBgpAdministrativeStateHeaders + }, + 204: { + headersMapper: Mappers.InternalNetworksUpdateBgpAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const updateBfdForBgpAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForBgpAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders + }, + 201: { + headersMapper: + Mappers.InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders + }, + 202: { + headersMapper: + Mappers.InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders + }, + 204: { + headersMapper: + Mappers.InternalNetworksUpdateBfdForBgpAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const clearIpv6NeighborsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/clearIpv6Neighbors", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.InternalNetworksClearIpv6NeighborsHeaders + }, + 201: { + headersMapper: Mappers.InternalNetworksClearIpv6NeighborsHeaders + }, + 202: { + headersMapper: Mappers.InternalNetworksClearIpv6NeighborsHeaders + }, + 204: { + headersMapper: Mappers.InternalNetworksClearIpv6NeighborsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const clearArpEntriesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/clearArpEntries", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.InternalNetworksClearArpEntriesHeaders + }, + 201: { + headersMapper: Mappers.InternalNetworksClearArpEntriesHeaders + }, + 202: { + headersMapper: Mappers.InternalNetworksClearArpEntriesHeaders + }, + 204: { + headersMapper: Mappers.InternalNetworksClearArpEntriesHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const updateBfdForStaticRouteAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForStaticRouteAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders + }, + 201: { + headersMapper: + Mappers.InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders + }, + 202: { + headersMapper: + Mappers.InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders + }, + 204: { + headersMapper: + Mappers.InternalNetworksUpdateBfdForStaticRouteAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName, + Parameters.internalNetworkName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.InternalNetworksList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipCommunities.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipCommunities.ts new file mode 100644 index 000000000000..13df0c08af46 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipCommunities.ts @@ -0,0 +1,720 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { IpCommunities } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + IpCommunity, + IpCommunitiesListByResourceGroupNextOptionalParams, + IpCommunitiesListByResourceGroupOptionalParams, + IpCommunitiesListByResourceGroupResponse, + IpCommunitiesListBySubscriptionNextOptionalParams, + IpCommunitiesListBySubscriptionOptionalParams, + IpCommunitiesListBySubscriptionResponse, + IpCommunitiesCreateOptionalParams, + IpCommunitiesCreateResponse, + IpCommunitiesGetOptionalParams, + IpCommunitiesGetResponse, + IpCommunityPatch, + IpCommunitiesUpdateOptionalParams, + IpCommunitiesUpdateResponse, + IpCommunitiesDeleteOptionalParams, + IpCommunitiesListByResourceGroupNextResponse, + IpCommunitiesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing IpCommunities operations. */ +export class IpCommunitiesImpl implements IpCommunities { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class IpCommunities class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Implements IpCommunities list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: IpCommunitiesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: IpCommunitiesListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IpCommunitiesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: IpCommunitiesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Implements IpCommunities list by subscription GET method. + * @param options The options parameters. + */ + public listBySubscription( + options?: IpCommunitiesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: IpCommunitiesListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IpCommunitiesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: IpCommunitiesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Implements an IP Community PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + ipCommunityName: string, + body: IpCommunity, + options?: IpCommunitiesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpCommunitiesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipCommunityName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + IpCommunitiesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Implements an IP Community PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + ipCommunityName: string, + body: IpCommunity, + options?: IpCommunitiesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + ipCommunityName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements an IP Community GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + ipCommunityName: string, + options?: IpCommunitiesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, ipCommunityName, options }, + getOperationSpec + ); + } + + /** + * API to update certain properties of the IP Community resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community + * @param body IP Community properties to update. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + ipCommunityName: string, + body: IpCommunityPatch, + options?: IpCommunitiesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpCommunitiesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipCommunityName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + IpCommunitiesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * API to update certain properties of the IP Community resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community + * @param body IP Community properties to update. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + ipCommunityName: string, + body: IpCommunityPatch, + options?: IpCommunitiesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + ipCommunityName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements IP Community DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + ipCommunityName: string, + options?: IpCommunitiesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipCommunityName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Implements IP Community DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + ipCommunityName: string, + options?: IpCommunitiesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + ipCommunityName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements IpCommunities list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: IpCommunitiesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Implements IpCommunities list by subscription GET method. + * @param options The options parameters. + */ + private _listBySubscription( + options?: IpCommunitiesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: IpCommunitiesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: IpCommunitiesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IpCommunity + }, + 201: { + bodyMapper: Mappers.IpCommunity + }, + 202: { + bodyMapper: Mappers.IpCommunity + }, + 204: { + bodyMapper: Mappers.IpCommunity + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipCommunityName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpCommunity + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipCommunityName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IpCommunity + }, + 201: { + bodyMapper: Mappers.IpCommunity + }, + 202: { + bodyMapper: Mappers.IpCommunity + }, + 204: { + bodyMapper: Mappers.IpCommunity + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipCommunityName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipCommunityName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpCommunitiesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpCommunitiesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpCommunitiesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpCommunitiesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipExtendedCommunities.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipExtendedCommunities.ts new file mode 100644 index 000000000000..afd453c03abf --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipExtendedCommunities.ts @@ -0,0 +1,720 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { IpExtendedCommunities } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + IpExtendedCommunity, + IpExtendedCommunitiesListByResourceGroupNextOptionalParams, + IpExtendedCommunitiesListByResourceGroupOptionalParams, + IpExtendedCommunitiesListByResourceGroupResponse, + IpExtendedCommunitiesListBySubscriptionNextOptionalParams, + IpExtendedCommunitiesListBySubscriptionOptionalParams, + IpExtendedCommunitiesListBySubscriptionResponse, + IpExtendedCommunitiesCreateOptionalParams, + IpExtendedCommunitiesCreateResponse, + IpExtendedCommunitiesGetOptionalParams, + IpExtendedCommunitiesGetResponse, + IpExtendedCommunityPatch, + IpExtendedCommunitiesUpdateOptionalParams, + IpExtendedCommunitiesUpdateResponse, + IpExtendedCommunitiesDeleteOptionalParams, + IpExtendedCommunitiesListByResourceGroupNextResponse, + IpExtendedCommunitiesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing IpExtendedCommunities operations. */ +export class IpExtendedCommunitiesImpl implements IpExtendedCommunities { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class IpExtendedCommunities class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Implements IpExtendedCommunities list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: IpExtendedCommunitiesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: IpExtendedCommunitiesListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IpExtendedCommunitiesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: IpExtendedCommunitiesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Implements IpExtendedCommunities list by subscription GET method. + * @param options The options parameters. + */ + public listBySubscription( + options?: IpExtendedCommunitiesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: IpExtendedCommunitiesListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IpExtendedCommunitiesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: IpExtendedCommunitiesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Implements IP Extended Community PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + ipExtendedCommunityName: string, + body: IpExtendedCommunity, + options?: IpExtendedCommunitiesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpExtendedCommunitiesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipExtendedCommunityName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + IpExtendedCommunitiesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Implements IP Extended Community PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + ipExtendedCommunityName: string, + body: IpExtendedCommunity, + options?: IpExtendedCommunitiesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + ipExtendedCommunityName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements IP Extended Community GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param options The options parameters. + */ + get( + resourceGroupName: string, + ipExtendedCommunityName: string, + options?: IpExtendedCommunitiesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, ipExtendedCommunityName, options }, + getOperationSpec + ); + } + + /** + * API to update certain properties of the IP Extended Community resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param body IP Extended Community properties to update. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + ipExtendedCommunityName: string, + body: IpExtendedCommunityPatch, + options?: IpExtendedCommunitiesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpExtendedCommunitiesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipExtendedCommunityName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + IpExtendedCommunitiesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * API to update certain properties of the IP Extended Community resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param body IP Extended Community properties to update. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + ipExtendedCommunityName: string, + body: IpExtendedCommunityPatch, + options?: IpExtendedCommunitiesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + ipExtendedCommunityName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements IP Extended Community DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + ipExtendedCommunityName: string, + options?: IpExtendedCommunitiesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipExtendedCommunityName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Implements IP Extended Community DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + ipExtendedCommunityName: string, + options?: IpExtendedCommunitiesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + ipExtendedCommunityName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements IpExtendedCommunities list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: IpExtendedCommunitiesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Implements IpExtendedCommunities list by subscription GET method. + * @param options The options parameters. + */ + private _listBySubscription( + options?: IpExtendedCommunitiesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: IpExtendedCommunitiesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: IpExtendedCommunitiesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IpExtendedCommunity + }, + 201: { + bodyMapper: Mappers.IpExtendedCommunity + }, + 202: { + bodyMapper: Mappers.IpExtendedCommunity + }, + 204: { + bodyMapper: Mappers.IpExtendedCommunity + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipExtendedCommunityName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpExtendedCommunity + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipExtendedCommunityName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IpExtendedCommunity + }, + 201: { + bodyMapper: Mappers.IpExtendedCommunity + }, + 202: { + bodyMapper: Mappers.IpExtendedCommunity + }, + 204: { + bodyMapper: Mappers.IpExtendedCommunity + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipExtendedCommunityName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipExtendedCommunityName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpExtendedCommunityListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpExtendedCommunityListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpExtendedCommunityListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpExtendedCommunityListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipPrefixes.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipPrefixes.ts new file mode 100644 index 000000000000..bb3a55fead49 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/ipPrefixes.ts @@ -0,0 +1,720 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { IpPrefixes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + IpPrefix, + IpPrefixesListByResourceGroupNextOptionalParams, + IpPrefixesListByResourceGroupOptionalParams, + IpPrefixesListByResourceGroupResponse, + IpPrefixesListBySubscriptionNextOptionalParams, + IpPrefixesListBySubscriptionOptionalParams, + IpPrefixesListBySubscriptionResponse, + IpPrefixesCreateOptionalParams, + IpPrefixesCreateResponse, + IpPrefixesGetOptionalParams, + IpPrefixesGetResponse, + IpPrefixPatch, + IpPrefixesUpdateOptionalParams, + IpPrefixesUpdateResponse, + IpPrefixesDeleteOptionalParams, + IpPrefixesListByResourceGroupNextResponse, + IpPrefixesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing IpPrefixes operations. */ +export class IpPrefixesImpl implements IpPrefixes { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class IpPrefixes class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Implements IpPrefixes list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: IpPrefixesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: IpPrefixesListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IpPrefixesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: IpPrefixesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Implements IpPrefixes list by subscription GET method. + * @param options The options parameters. + */ + public listBySubscription( + options?: IpPrefixesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: IpPrefixesListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IpPrefixesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: IpPrefixesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Implements IP Prefix PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + ipPrefixName: string, + body: IpPrefix, + options?: IpPrefixesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpPrefixesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipPrefixName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + IpPrefixesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Implements IP Prefix PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + ipPrefixName: string, + body: IpPrefix, + options?: IpPrefixesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + ipPrefixName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements IP Prefix GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param options The options parameters. + */ + get( + resourceGroupName: string, + ipPrefixName: string, + options?: IpPrefixesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, ipPrefixName, options }, + getOperationSpec + ); + } + + /** + * API to update certain properties of the IP Prefix resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param body IP Prefix properties to update. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + ipPrefixName: string, + body: IpPrefixPatch, + options?: IpPrefixesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpPrefixesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipPrefixName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + IpPrefixesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * API to update certain properties of the IP Prefix resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param body IP Prefix properties to update. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + ipPrefixName: string, + body: IpPrefixPatch, + options?: IpPrefixesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + ipPrefixName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements IP Prefix DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + ipPrefixName: string, + options?: IpPrefixesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, ipPrefixName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Implements IP Prefix DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + ipPrefixName: string, + options?: IpPrefixesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + ipPrefixName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements IpPrefixes list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: IpPrefixesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Implements IpPrefixes list by subscription GET method. + * @param options The options parameters. + */ + private _listBySubscription( + options?: IpPrefixesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: IpPrefixesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: IpPrefixesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IpPrefix + }, + 201: { + bodyMapper: Mappers.IpPrefix + }, + 202: { + bodyMapper: Mappers.IpPrefix + }, + 204: { + bodyMapper: Mappers.IpPrefix + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipPrefixName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpPrefix + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipPrefixName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.IpPrefix + }, + 201: { + bodyMapper: Mappers.IpPrefix + }, + 202: { + bodyMapper: Mappers.IpPrefix + }, + 204: { + bodyMapper: Mappers.IpPrefix + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipPrefixName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ipPrefixName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpPrefixesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpPrefixesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpPrefixesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IpPrefixesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/l2IsolationDomains.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/l2IsolationDomains.ts new file mode 100644 index 000000000000..b994a1ea0052 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/l2IsolationDomains.ts @@ -0,0 +1,1265 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { L2IsolationDomains } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + L2IsolationDomain, + L2IsolationDomainsListByResourceGroupNextOptionalParams, + L2IsolationDomainsListByResourceGroupOptionalParams, + L2IsolationDomainsListByResourceGroupResponse, + L2IsolationDomainsListBySubscriptionNextOptionalParams, + L2IsolationDomainsListBySubscriptionOptionalParams, + L2IsolationDomainsListBySubscriptionResponse, + L2IsolationDomainsCreateOptionalParams, + L2IsolationDomainsCreateResponse, + L2IsolationDomainsGetOptionalParams, + L2IsolationDomainsGetResponse, + L2IsolationDomainPatch, + L2IsolationDomainsUpdateOptionalParams, + L2IsolationDomainsUpdateResponse, + L2IsolationDomainsDeleteOptionalParams, + UpdateAdministrativeState, + L2IsolationDomainsUpdateAdministrativeStateOptionalParams, + L2IsolationDomainsUpdateAdministrativeStateResponse, + EnableDisableOnResources, + L2IsolationDomainsClearArpTableOptionalParams, + L2IsolationDomainsClearArpTableResponse, + L2IsolationDomainsClearNeighborTableOptionalParams, + L2IsolationDomainsClearNeighborTableResponse, + L2IsolationDomainsGetArpEntriesOptionalParams, + L2IsolationDomainsGetArpEntriesResponse, + L2IsolationDomainsListByResourceGroupNextResponse, + L2IsolationDomainsListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing L2IsolationDomains operations. */ +export class L2IsolationDomainsImpl implements L2IsolationDomains { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class L2IsolationDomains class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Displays L2IsolationDomains list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: L2IsolationDomainsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: L2IsolationDomainsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: L2IsolationDomainsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: L2IsolationDomainsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Displays L2IsolationDomains list by subscription GET method. + * @param options The options parameters. + */ + public listBySubscription( + options?: L2IsolationDomainsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: L2IsolationDomainsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: L2IsolationDomainsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: L2IsolationDomainsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + * configuration is applied on the devices only after the isolation domain is enabled. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + l2IsolationDomainName: string, + body: L2IsolationDomain, + options?: L2IsolationDomainsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l2IsolationDomainName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + L2IsolationDomainsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + * configuration is applied on the devices only after the isolation domain is enabled. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: L2IsolationDomain, + options?: L2IsolationDomainsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + l2IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements L2 Isolation Domain GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param options The options parameters. + */ + get( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, l2IsolationDomainName, options }, + getOperationSpec + ); + } + + /** + * API to update certain properties of the L2 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + l2IsolationDomainName: string, + body: L2IsolationDomainPatch, + options?: L2IsolationDomainsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l2IsolationDomainName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + L2IsolationDomainsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * API to update certain properties of the L2 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: L2IsolationDomainPatch, + options?: L2IsolationDomainsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + l2IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l2IsolationDomainName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + l2IsolationDomainName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeState( + resourceGroupName: string, + l2IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L2IsolationDomainsUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsUpdateAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l2IsolationDomainName, body, options }, + spec: updateAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + L2IsolationDomainsUpdateAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L2IsolationDomainsUpdateAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateAdministrativeState( + resourceGroupName, + l2IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Clears ARP tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearArpTable( + resourceGroupName: string, + l2IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L2IsolationDomainsClearArpTableOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsClearArpTableResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l2IsolationDomainName, body, options }, + spec: clearArpTableOperationSpec + }); + const poller = await createHttpPoller< + L2IsolationDomainsClearArpTableResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Clears ARP tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearArpTableAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L2IsolationDomainsClearArpTableOptionalParams + ): Promise { + const poller = await this.beginClearArpTable( + resourceGroupName, + l2IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Clears IPv6 neighbors for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearNeighborTable( + resourceGroupName: string, + l2IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L2IsolationDomainsClearNeighborTableOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsClearNeighborTableResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l2IsolationDomainName, body, options }, + spec: clearNeighborTableOperationSpec + }); + const poller = await createHttpPoller< + L2IsolationDomainsClearNeighborTableResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Clears IPv6 neighbors for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearNeighborTableAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L2IsolationDomainsClearNeighborTableOptionalParams + ): Promise { + const poller = await this.beginClearNeighborTable( + resourceGroupName, + l2IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Clears IPv6 neighbors for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param options The options parameters. + */ + async beginGetArpEntries( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsGetArpEntriesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsGetArpEntriesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l2IsolationDomainName, options }, + spec: getArpEntriesOperationSpec + }); + const poller = await createHttpPoller< + L2IsolationDomainsGetArpEntriesResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Clears IPv6 neighbors for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param options The options parameters. + */ + async beginGetArpEntriesAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsGetArpEntriesOptionalParams + ): Promise { + const poller = await this.beginGetArpEntries( + resourceGroupName, + l2IsolationDomainName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Displays L2IsolationDomains list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: L2IsolationDomainsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Displays L2IsolationDomains list by subscription GET method. + * @param options The options parameters. + */ + private _listBySubscription( + options?: L2IsolationDomainsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: L2IsolationDomainsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: L2IsolationDomainsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.L2IsolationDomain + }, + 201: { + bodyMapper: Mappers.L2IsolationDomain + }, + 202: { + bodyMapper: Mappers.L2IsolationDomain + }, + 204: { + bodyMapper: Mappers.L2IsolationDomain + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l2IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L2IsolationDomain + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l2IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.L2IsolationDomain + }, + 201: { + bodyMapper: Mappers.L2IsolationDomain + }, + 202: { + bodyMapper: Mappers.L2IsolationDomain + }, + 204: { + bodyMapper: Mappers.L2IsolationDomain + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l2IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l2IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.L2IsolationDomainsUpdateAdministrativeStateHeaders + }, + 201: { + headersMapper: Mappers.L2IsolationDomainsUpdateAdministrativeStateHeaders + }, + 202: { + headersMapper: Mappers.L2IsolationDomainsUpdateAdministrativeStateHeaders + }, + 204: { + headersMapper: Mappers.L2IsolationDomainsUpdateAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l2IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const clearArpTableOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/clearArpTable", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.L2IsolationDomainsClearArpTableHeaders + }, + 201: { + headersMapper: Mappers.L2IsolationDomainsClearArpTableHeaders + }, + 202: { + headersMapper: Mappers.L2IsolationDomainsClearArpTableHeaders + }, + 204: { + headersMapper: Mappers.L2IsolationDomainsClearArpTableHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l2IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const clearNeighborTableOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/clearNeighborTable", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.L2IsolationDomainsClearNeighborTableHeaders + }, + 201: { + headersMapper: Mappers.L2IsolationDomainsClearNeighborTableHeaders + }, + 202: { + headersMapper: Mappers.L2IsolationDomainsClearNeighborTableHeaders + }, + 204: { + headersMapper: Mappers.L2IsolationDomainsClearNeighborTableHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l2IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getArpEntriesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/getArpEntries", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "ARPProperties" } } + } + }, + headersMapper: Mappers.L2IsolationDomainsGetArpEntriesHeaders + }, + 201: { + bodyMapper: { + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "ARPProperties" } } + } + }, + headersMapper: Mappers.L2IsolationDomainsGetArpEntriesHeaders + }, + 202: { + bodyMapper: { + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "ARPProperties" } } + } + }, + headersMapper: Mappers.L2IsolationDomainsGetArpEntriesHeaders + }, + 204: { + bodyMapper: { + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "ARPProperties" } } + } + }, + headersMapper: Mappers.L2IsolationDomainsGetArpEntriesHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l2IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L2IsolationDomainsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L2IsolationDomainsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L2IsolationDomainsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L2IsolationDomainsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/l3IsolationDomains.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/l3IsolationDomains.ts new file mode 100644 index 000000000000..108208630119 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/l3IsolationDomains.ts @@ -0,0 +1,1256 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { L3IsolationDomains } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + L3IsolationDomain, + L3IsolationDomainsListByResourceGroupNextOptionalParams, + L3IsolationDomainsListByResourceGroupOptionalParams, + L3IsolationDomainsListByResourceGroupResponse, + L3IsolationDomainsListBySubscriptionNextOptionalParams, + L3IsolationDomainsListBySubscriptionOptionalParams, + L3IsolationDomainsListBySubscriptionResponse, + L3IsolationDomainsCreateOptionalParams, + L3IsolationDomainsCreateResponse, + L3IsolationDomainsGetOptionalParams, + L3IsolationDomainsGetResponse, + L3IsolationDomainPatch, + L3IsolationDomainsUpdateOptionalParams, + L3IsolationDomainsUpdateResponse, + L3IsolationDomainsDeleteOptionalParams, + UpdateAdministrativeState, + L3IsolationDomainsUpdateAdministrativeStateOptionalParams, + L3IsolationDomainsUpdateAdministrativeStateResponse, + L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams, + L3IsolationDomainsUpdateOptionBAdministrativeStateResponse, + EnableDisableOnResources, + L3IsolationDomainsClearArpTableOptionalParams, + L3IsolationDomainsClearArpTableResponse, + L3IsolationDomainsClearNeighborTableOptionalParams, + L3IsolationDomainsClearNeighborTableResponse, + L3IsolationDomainsListByResourceGroupNextResponse, + L3IsolationDomainsListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing L3IsolationDomains operations. */ +export class L3IsolationDomainsImpl implements L3IsolationDomains { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class L3IsolationDomains class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Displays L3IsolationDomains list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: L3IsolationDomainsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: L3IsolationDomainsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: L3IsolationDomainsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: L3IsolationDomainsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Displays L3IsolationDomains list by subscription GET method. + * @param options The options parameters. + */ + public listBySubscription( + options?: L3IsolationDomainsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: L3IsolationDomainsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: L3IsolationDomainsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: L3IsolationDomainsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Create isolation domain resources for layer 3 connectivity between compute nodes and for + * communication with external services .This configuration is applied on the devices only after the + * creation of networks is completed and isolation domain is enabled. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + l3IsolationDomainName: string, + body: L3IsolationDomain, + options?: L3IsolationDomainsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l3IsolationDomainName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + L3IsolationDomainsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create isolation domain resources for layer 3 connectivity between compute nodes and for + * communication with external services .This configuration is applied on the devices only after the + * creation of networks is completed and isolation domain is enabled. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: L3IsolationDomain, + options?: L3IsolationDomainsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + l3IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves details of this L3 Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param options The options parameters. + */ + get( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: L3IsolationDomainsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, l3IsolationDomainName, options }, + getOperationSpec + ); + } + + /** + * API to update certain properties of the L3 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + l3IsolationDomainName: string, + body: L3IsolationDomainPatch, + options?: L3IsolationDomainsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l3IsolationDomainName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + L3IsolationDomainsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * API to update certain properties of the L3 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: L3IsolationDomainPatch, + options?: L3IsolationDomainsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + l3IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: L3IsolationDomainsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l3IsolationDomainName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: L3IsolationDomainsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + l3IsolationDomainName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Displays L3IsolationDomains list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: L3IsolationDomainsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Displays L3IsolationDomains list by subscription GET method. + * @param options The options parameters. + */ + private _listBySubscription( + options?: L3IsolationDomainsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Enables racks for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L3IsolationDomainsUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsUpdateAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l3IsolationDomainName, body, options }, + spec: updateAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + L3IsolationDomainsUpdateAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Enables racks for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L3IsolationDomainsUpdateAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update administrative state of option B on CE devices + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateOptionBAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + L3IsolationDomainsUpdateOptionBAdministrativeStateResponse + >, + L3IsolationDomainsUpdateOptionBAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l3IsolationDomainName, body, options }, + spec: updateOptionBAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + L3IsolationDomainsUpdateOptionBAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update administrative state of option B on CE devices + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateOptionBAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateOptionBAdministrativeState( + resourceGroupName, + l3IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Clears ARP tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearArpTable( + resourceGroupName: string, + l3IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L3IsolationDomainsClearArpTableOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsClearArpTableResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l3IsolationDomainName, body, options }, + spec: clearArpTableOperationSpec + }); + const poller = await createHttpPoller< + L3IsolationDomainsClearArpTableResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Clears ARP tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearArpTableAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L3IsolationDomainsClearArpTableOptionalParams + ): Promise { + const poller = await this.beginClearArpTable( + resourceGroupName, + l3IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Clears IPv6 neighbor tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearNeighborTable( + resourceGroupName: string, + l3IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L3IsolationDomainsClearNeighborTableOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsClearNeighborTableResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, l3IsolationDomainName, body, options }, + spec: clearNeighborTableOperationSpec + }); + const poller = await createHttpPoller< + L3IsolationDomainsClearNeighborTableResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Clears IPv6 neighbor tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + async beginClearNeighborTableAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L3IsolationDomainsClearNeighborTableOptionalParams + ): Promise { + const poller = await this.beginClearNeighborTable( + resourceGroupName, + l3IsolationDomainName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: L3IsolationDomainsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: L3IsolationDomainsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.L3IsolationDomain + }, + 201: { + bodyMapper: Mappers.L3IsolationDomain + }, + 202: { + bodyMapper: Mappers.L3IsolationDomain + }, + 204: { + bodyMapper: Mappers.L3IsolationDomain + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body12, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L3IsolationDomain + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.L3IsolationDomain + }, + 201: { + bodyMapper: Mappers.L3IsolationDomain + }, + 202: { + bodyMapper: Mappers.L3IsolationDomain + }, + 204: { + bodyMapper: Mappers.L3IsolationDomain + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body13, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L3IsolationDomainsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L3IsolationDomainsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const updateAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.L3IsolationDomainsUpdateAdministrativeStateHeaders + }, + 201: { + headersMapper: Mappers.L3IsolationDomainsUpdateAdministrativeStateHeaders + }, + 202: { + headersMapper: Mappers.L3IsolationDomainsUpdateAdministrativeStateHeaders + }, + 204: { + headersMapper: Mappers.L3IsolationDomainsUpdateAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const updateOptionBAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateOptionBAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders + }, + 201: { + headersMapper: + Mappers.L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders + }, + 202: { + headersMapper: + Mappers.L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders + }, + 204: { + headersMapper: + Mappers.L3IsolationDomainsUpdateOptionBAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const clearArpTableOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/clearArpTable", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.L3IsolationDomainsClearArpTableHeaders + }, + 201: { + headersMapper: Mappers.L3IsolationDomainsClearArpTableHeaders + }, + 202: { + headersMapper: Mappers.L3IsolationDomainsClearArpTableHeaders + }, + 204: { + headersMapper: Mappers.L3IsolationDomainsClearArpTableHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const clearNeighborTableOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/clearNeighborTable", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.L3IsolationDomainsClearNeighborTableHeaders + }, + 201: { + headersMapper: Mappers.L3IsolationDomainsClearNeighborTableHeaders + }, + 202: { + headersMapper: Mappers.L3IsolationDomainsClearNeighborTableHeaders + }, + 204: { + headersMapper: Mappers.L3IsolationDomainsClearNeighborTableHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.l3IsolationDomainName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L3IsolationDomainsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.L3IsolationDomainsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkDeviceSkus.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkDeviceSkus.ts new file mode 100644 index 000000000000..ff1d69d67e19 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkDeviceSkus.ts @@ -0,0 +1,195 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkDeviceSkus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + NetworkDeviceSku, + NetworkDeviceSkusListBySubscriptionNextOptionalParams, + NetworkDeviceSkusListBySubscriptionOptionalParams, + NetworkDeviceSkusListBySubscriptionResponse, + NetworkDeviceSkusGetOptionalParams, + NetworkDeviceSkusGetResponse, + NetworkDeviceSkusListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing NetworkDeviceSkus operations. */ +export class NetworkDeviceSkusImpl implements NetworkDeviceSkus { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkDeviceSkus class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * List Network Device SKUs for the given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: NetworkDeviceSkusListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: NetworkDeviceSkusListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkDeviceSkusListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: NetworkDeviceSkusListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get Network Device SKU details. + * @param networkDeviceSkuName Name of the Network Device Sku + * @param options The options parameters. + */ + get( + networkDeviceSkuName: string, + options?: NetworkDeviceSkusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { networkDeviceSkuName, options }, + getOperationSpec + ); + } + + /** + * List Network Device SKUs for the given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: NetworkDeviceSkusListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: NetworkDeviceSkusListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkDeviceSku + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.networkDeviceSkuName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkDeviceSkusListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkDeviceSkusListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkDevices.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkDevices.ts new file mode 100644 index 000000000000..684aadbf1158 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkDevices.ts @@ -0,0 +1,1824 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkDevices } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkDevice, + NetworkDevicesListByResourceGroupNextOptionalParams, + NetworkDevicesListByResourceGroupOptionalParams, + NetworkDevicesListByResourceGroupResponse, + NetworkDevicesListBySubscriptionNextOptionalParams, + NetworkDevicesListBySubscriptionOptionalParams, + NetworkDevicesListBySubscriptionResponse, + NetworkDevicesCreateOptionalParams, + NetworkDevicesCreateResponse, + NetworkDevicesGetOptionalParams, + NetworkDevicesGetResponse, + NetworkDevicePatchParameters, + NetworkDevicesUpdateOptionalParams, + NetworkDevicesUpdateResponse, + NetworkDevicesDeleteOptionalParams, + NetworkDevicesRebootOptionalParams, + NetworkDevicesRebootResponse, + NetworkDevicesRestoreConfigOptionalParams, + NetworkDevicesRestoreConfigResponse, + UpdateVersionProperties, + NetworkDevicesUpdateVersionOptionalParams, + NetworkDevicesUpdateVersionResponse, + NetworkDevicesGenerateSupportPackageOptionalParams, + NetworkDevicesGenerateSupportPackageResponse, + UpdatePowerCycleProperties, + NetworkDevicesUpdatePowerCycleOptionalParams, + NetworkDevicesUpdatePowerCycleResponse, + NetworkDevicesGetStatusOptionalParams, + NetworkDevicesGetStatusResponse, + NetworkDevicesGetStaticInterfaceMapsOptionalParams, + NetworkDevicesGetStaticInterfaceMapsResponse, + NetworkDevicesGetDynamicInterfaceMapsOptionalParams, + NetworkDevicesGetDynamicInterfaceMapsResponse, + NetworkDevicesListByResourceGroupNextResponse, + NetworkDevicesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing NetworkDevices operations. */ +export class NetworkDevicesImpl implements NetworkDevices { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkDevices class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * List all the Network Device resources in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: NetworkDevicesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: NetworkDevicesListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkDevicesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: NetworkDevicesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List all the Network Device resources in a given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: NetworkDevicesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: NetworkDevicesListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkDevicesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: NetworkDevicesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Create a Network Device resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + networkDeviceName: string, + body: NetworkDevice, + options?: NetworkDevicesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a Network Device resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + networkDeviceName: string, + body: NetworkDevice, + options?: NetworkDevicesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + networkDeviceName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get the Network Device resource details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkDeviceName, options }, + getOperationSpec + ); + } + + /** + * Update certain properties of the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param body Network Device properties to update. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + networkDeviceName: string, + body: NetworkDevicePatchParameters, + options?: NetworkDevicesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update certain properties of the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param body Network Device properties to update. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + networkDeviceName: string, + body: NetworkDevicePatchParameters, + options?: NetworkDevicesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + networkDeviceName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkDeviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * List all the Network Device resources in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: NetworkDevicesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List all the Network Device resources in a given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: NetworkDevicesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Reboot the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginReboot( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesRebootOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesRebootResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, options }, + spec: rebootOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesRebootResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Reboot the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginRebootAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesRebootOptionalParams + ): Promise { + const poller = await this.beginReboot( + resourceGroupName, + networkDeviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Restore the configuration of the Network Device resource to last known good configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginRestoreConfig( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesRestoreConfigOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesRestoreConfigResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, options }, + spec: restoreConfigOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesRestoreConfigResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Restore the configuration of the Network Device resource to last known good configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginRestoreConfigAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesRestoreConfigOptionalParams + ): Promise { + const poller = await this.beginRestoreConfig( + resourceGroupName, + networkDeviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the SKU version of the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateVersion( + resourceGroupName: string, + networkDeviceName: string, + body: UpdateVersionProperties, + options?: NetworkDevicesUpdateVersionOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesUpdateVersionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, body, options }, + spec: updateVersionOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesUpdateVersionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update the SKU version of the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateVersionAndWait( + resourceGroupName: string, + networkDeviceName: string, + body: UpdateVersionProperties, + options?: NetworkDevicesUpdateVersionOptionalParams + ): Promise { + const poller = await this.beginUpdateVersion( + resourceGroupName, + networkDeviceName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Generate Support Package for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginGenerateSupportPackage( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGenerateSupportPackageOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesGenerateSupportPackageResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, options }, + spec: generateSupportPackageOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesGenerateSupportPackageResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Generate Support Package for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginGenerateSupportPackageAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGenerateSupportPackageOptionalParams + ): Promise { + const poller = await this.beginGenerateSupportPackage( + resourceGroupName, + networkDeviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update PDU power cycle of the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdatePowerCycle( + resourceGroupName: string, + networkDeviceName: string, + body: UpdatePowerCycleProperties, + options?: NetworkDevicesUpdatePowerCycleOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesUpdatePowerCycleResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, body, options }, + spec: updatePowerCycleOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesUpdatePowerCycleResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update PDU power cycle of the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdatePowerCycleAndWait( + resourceGroupName: string, + networkDeviceName: string, + body: UpdatePowerCycleProperties, + options?: NetworkDevicesUpdatePowerCycleOptionalParams + ): Promise { + const poller = await this.beginUpdatePowerCycle( + resourceGroupName, + networkDeviceName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get the running status of the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginGetStatus( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetStatusOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesGetStatusResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, options }, + spec: getStatusOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesGetStatusResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Get the running status of the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginGetStatusAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetStatusOptionalParams + ): Promise { + const poller = await this.beginGetStatus( + resourceGroupName, + networkDeviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get the static interface maps for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginGetStaticInterfaceMaps( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetStaticInterfaceMapsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesGetStaticInterfaceMapsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, options }, + spec: getStaticInterfaceMapsOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesGetStaticInterfaceMapsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Get the static interface maps for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginGetStaticInterfaceMapsAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetStaticInterfaceMapsOptionalParams + ): Promise { + const poller = await this.beginGetStaticInterfaceMaps( + resourceGroupName, + networkDeviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get the dynamic interface maps for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginGetDynamicInterfaceMaps( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetDynamicInterfaceMapsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesGetDynamicInterfaceMapsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkDeviceName, options }, + spec: getDynamicInterfaceMapsOperationSpec + }); + const poller = await createHttpPoller< + NetworkDevicesGetDynamicInterfaceMapsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Get the dynamic interface maps for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + async beginGetDynamicInterfaceMapsAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetDynamicInterfaceMapsOptionalParams + ): Promise { + const poller = await this.beginGetDynamicInterfaceMaps( + resourceGroupName, + networkDeviceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: NetworkDevicesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: NetworkDevicesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NetworkDevice + }, + 201: { + bodyMapper: Mappers.NetworkDevice + }, + 202: { + bodyMapper: Mappers.NetworkDevice + }, + 204: { + bodyMapper: Mappers.NetworkDevice + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body18, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkDevice + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.NetworkDevice + }, + 201: { + bodyMapper: Mappers.NetworkDevice + }, + 202: { + bodyMapper: Mappers.NetworkDevice + }, + 204: { + bodyMapper: Mappers.NetworkDevice + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body19, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkDevicesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkDevicesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const rebootOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.NetworkDevicesRebootHeaders + }, + 201: { + headersMapper: Mappers.NetworkDevicesRebootHeaders + }, + 202: { + headersMapper: Mappers.NetworkDevicesRebootHeaders + }, + 204: { + headersMapper: Mappers.NetworkDevicesRebootHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const restoreConfigOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/restoreConfig", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.NetworkDevicesRestoreConfigHeaders + }, + 201: { + headersMapper: Mappers.NetworkDevicesRestoreConfigHeaders + }, + 202: { + headersMapper: Mappers.NetworkDevicesRestoreConfigHeaders + }, + 204: { + headersMapper: Mappers.NetworkDevicesRestoreConfigHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateVersionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateVersion", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.NetworkDevicesUpdateVersionHeaders + }, + 201: { + headersMapper: Mappers.NetworkDevicesUpdateVersionHeaders + }, + 202: { + headersMapper: Mappers.NetworkDevicesUpdateVersionHeaders + }, + 204: { + headersMapper: Mappers.NetworkDevicesUpdateVersionHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body20, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const generateSupportPackageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/generateSupportPackage", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SupportPackageProperties, + headersMapper: Mappers.NetworkDevicesGenerateSupportPackageHeaders + }, + 201: { + bodyMapper: Mappers.SupportPackageProperties, + headersMapper: Mappers.NetworkDevicesGenerateSupportPackageHeaders + }, + 202: { + bodyMapper: Mappers.SupportPackageProperties, + headersMapper: Mappers.NetworkDevicesGenerateSupportPackageHeaders + }, + 204: { + bodyMapper: Mappers.SupportPackageProperties, + headersMapper: Mappers.NetworkDevicesGenerateSupportPackageHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updatePowerCycleOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updatePowerCycle", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.NetworkDevicesUpdatePowerCycleHeaders + }, + 201: { + headersMapper: Mappers.NetworkDevicesUpdatePowerCycleHeaders + }, + 202: { + headersMapper: Mappers.NetworkDevicesUpdatePowerCycleHeaders + }, + 204: { + headersMapper: Mappers.NetworkDevicesUpdatePowerCycleHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body21, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getStatusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getStatus", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.GetDeviceStatusProperties, + headersMapper: Mappers.NetworkDevicesGetStatusHeaders + }, + 201: { + bodyMapper: Mappers.GetDeviceStatusProperties, + headersMapper: Mappers.NetworkDevicesGetStatusHeaders + }, + 202: { + bodyMapper: Mappers.GetDeviceStatusProperties, + headersMapper: Mappers.NetworkDevicesGetStatusHeaders + }, + 204: { + bodyMapper: Mappers.GetDeviceStatusProperties, + headersMapper: Mappers.NetworkDevicesGetStatusHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getStaticInterfaceMapsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getStaticInterfaceMaps", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetStaticInterfaceMapsPropertiesItem" + } + } + } + }, + headersMapper: Mappers.NetworkDevicesGetStaticInterfaceMapsHeaders + }, + 201: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetStaticInterfaceMapsPropertiesItem" + } + } + } + }, + headersMapper: Mappers.NetworkDevicesGetStaticInterfaceMapsHeaders + }, + 202: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetStaticInterfaceMapsPropertiesItem" + } + } + } + }, + headersMapper: Mappers.NetworkDevicesGetStaticInterfaceMapsHeaders + }, + 204: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetStaticInterfaceMapsPropertiesItem" + } + } + } + }, + headersMapper: Mappers.NetworkDevicesGetStaticInterfaceMapsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getDynamicInterfaceMapsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getDynamicInterfaceMaps", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetDynamicInterfaceMapsPropertiesItem" + } + } + } + }, + headersMapper: Mappers.NetworkDevicesGetDynamicInterfaceMapsHeaders + }, + 201: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetDynamicInterfaceMapsPropertiesItem" + } + } + } + }, + headersMapper: Mappers.NetworkDevicesGetDynamicInterfaceMapsHeaders + }, + 202: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetDynamicInterfaceMapsPropertiesItem" + } + } + } + }, + headersMapper: Mappers.NetworkDevicesGetDynamicInterfaceMapsHeaders + }, + 204: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GetDynamicInterfaceMapsPropertiesItem" + } + } + } + }, + headersMapper: Mappers.NetworkDevicesGetDynamicInterfaceMapsHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkDevicesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkDevicesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabricControllers.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabricControllers.ts new file mode 100644 index 000000000000..0c3a735f4129 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabricControllers.ts @@ -0,0 +1,984 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkFabricControllers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkFabricController, + NetworkFabricControllersListByResourceGroupNextOptionalParams, + NetworkFabricControllersListByResourceGroupOptionalParams, + NetworkFabricControllersListByResourceGroupResponse, + NetworkFabricControllersListBySubscriptionNextOptionalParams, + NetworkFabricControllersListBySubscriptionOptionalParams, + NetworkFabricControllersListBySubscriptionResponse, + NetworkFabricControllersCreateOptionalParams, + NetworkFabricControllersCreateResponse, + NetworkFabricControllersGetOptionalParams, + NetworkFabricControllersGetResponse, + NetworkFabricControllerPatch, + NetworkFabricControllersUpdateOptionalParams, + NetworkFabricControllersUpdateResponse, + NetworkFabricControllersDeleteOptionalParams, + NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams, + NetworkFabricControllersEnableWorkloadManagementNetworkResponse, + NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams, + NetworkFabricControllersDisableWorkloadManagementNetworkResponse, + NetworkFabricControllersListByResourceGroupNextResponse, + NetworkFabricControllersListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing NetworkFabricControllers operations. */ +export class NetworkFabricControllersImpl implements NetworkFabricControllers { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkFabricControllers class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Lists all the NetworkFabricControllers thats available in the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: NetworkFabricControllersListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: NetworkFabricControllersListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkFabricControllersListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: NetworkFabricControllersListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Lists all the NetworkFabricControllers by subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: NetworkFabricControllersListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: NetworkFabricControllersListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkFabricControllersListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: NetworkFabricControllersListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Creates a Network Fabric Controller. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + networkFabricControllerName: string, + body: NetworkFabricController, + options?: NetworkFabricControllersCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricControllersCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricControllerName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + NetworkFabricControllersCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a Network Fabric Controller. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + body: NetworkFabricController, + options?: NetworkFabricControllersCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + networkFabricControllerName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Shows the provisioning status of Network Fabric Controller. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkFabricControllerName, options }, + getOperationSpec + ); + } + + /** + * Updates are currently not supported for the Network Fabric Controller resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param body Network Fabric Controller properties to update. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + networkFabricControllerName: string, + body: NetworkFabricControllerPatch, + options?: NetworkFabricControllersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricControllersUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricControllerName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NetworkFabricControllersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Updates are currently not supported for the Network Fabric Controller resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param body Network Fabric Controller properties to update. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + body: NetworkFabricControllerPatch, + options?: NetworkFabricControllersUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + networkFabricControllerName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the Network Fabric Controller resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricControllerName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the Network Fabric Controller resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkFabricControllerName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all the NetworkFabricControllers thats available in the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: NetworkFabricControllersListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Lists all the NetworkFabricControllers by subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: NetworkFabricControllersListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Enables the workloadManagementNetwork (Tenant Network). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the networkFabricController. + * @param options The options parameters. + */ + async beginEnableWorkloadManagementNetwork( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + NetworkFabricControllersEnableWorkloadManagementNetworkResponse + >, + NetworkFabricControllersEnableWorkloadManagementNetworkResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricControllerName, options }, + spec: enableWorkloadManagementNetworkOperationSpec + }); + const poller = await createHttpPoller< + NetworkFabricControllersEnableWorkloadManagementNetworkResponse, + OperationState< + NetworkFabricControllersEnableWorkloadManagementNetworkResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Enables the workloadManagementNetwork (Tenant Network). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the networkFabricController. + * @param options The options parameters. + */ + async beginEnableWorkloadManagementNetworkAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams + ): Promise { + const poller = await this.beginEnableWorkloadManagementNetwork( + resourceGroupName, + networkFabricControllerName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Disables the workloadManagementNetwork (Tenant Network). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the networkFabricController. + * @param options The options parameters. + */ + async beginDisableWorkloadManagementNetwork( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + NetworkFabricControllersDisableWorkloadManagementNetworkResponse + >, + NetworkFabricControllersDisableWorkloadManagementNetworkResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricControllerName, options }, + spec: disableWorkloadManagementNetworkOperationSpec + }); + const poller = await createHttpPoller< + NetworkFabricControllersDisableWorkloadManagementNetworkResponse, + OperationState< + NetworkFabricControllersDisableWorkloadManagementNetworkResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Disables the workloadManagementNetwork (Tenant Network). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the networkFabricController. + * @param options The options parameters. + */ + async beginDisableWorkloadManagementNetworkAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams + ): Promise { + const poller = await this.beginDisableWorkloadManagementNetwork( + resourceGroupName, + networkFabricControllerName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: NetworkFabricControllersListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: NetworkFabricControllersListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricController + }, + 201: { + bodyMapper: Mappers.NetworkFabricController + }, + 202: { + bodyMapper: Mappers.NetworkFabricController + }, + 204: { + bodyMapper: Mappers.NetworkFabricController + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body24, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricControllerName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricController + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricControllerName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricController + }, + 201: { + bodyMapper: Mappers.NetworkFabricController + }, + 202: { + bodyMapper: Mappers.NetworkFabricController + }, + 204: { + bodyMapper: Mappers.NetworkFabricController + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body25, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricControllerName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricControllerName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricControllersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricControllersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const enableWorkloadManagementNetworkOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}/enableWorkloadManagementNetwork", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.NetworkFabricControllersEnableWorkloadManagementNetworkHeaders + }, + 201: { + headersMapper: + Mappers.NetworkFabricControllersEnableWorkloadManagementNetworkHeaders + }, + 202: { + headersMapper: + Mappers.NetworkFabricControllersEnableWorkloadManagementNetworkHeaders + }, + 204: { + headersMapper: + Mappers.NetworkFabricControllersEnableWorkloadManagementNetworkHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricControllerName + ], + headerParameters: [Parameters.accept], + serializer +}; +const disableWorkloadManagementNetworkOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}/disableWorkloadManagementNetwork", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.NetworkFabricControllersDisableWorkloadManagementNetworkHeaders + }, + 201: { + headersMapper: + Mappers.NetworkFabricControllersDisableWorkloadManagementNetworkHeaders + }, + 202: { + headersMapper: + Mappers.NetworkFabricControllersDisableWorkloadManagementNetworkHeaders + }, + 204: { + headersMapper: + Mappers.NetworkFabricControllersDisableWorkloadManagementNetworkHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricControllerName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricControllersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricControllersListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabricSkus.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabricSkus.ts new file mode 100644 index 000000000000..0eefde1e002d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabricSkus.ts @@ -0,0 +1,195 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkFabricSkus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + NetworkFabricSku, + NetworkFabricSkusListBySubscriptionNextOptionalParams, + NetworkFabricSkusListBySubscriptionOptionalParams, + NetworkFabricSkusListBySubscriptionResponse, + NetworkFabricSkusGetOptionalParams, + NetworkFabricSkusGetResponse, + NetworkFabricSkusListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing NetworkFabricSkus operations. */ +export class NetworkFabricSkusImpl implements NetworkFabricSkus { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkFabricSkus class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Implements NetworkFabricSkus list by subscription GET method. + * @param options The options parameters. + */ + public listBySubscription( + options?: NetworkFabricSkusListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: NetworkFabricSkusListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkFabricSkusListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: NetworkFabricSkusListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Implements Network Fabric Sku GET method. + * @param networkFabricSkuName Name of the Network Fabric Sku + * @param options The options parameters. + */ + get( + networkFabricSkuName: string, + options?: NetworkFabricSkusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { networkFabricSkuName, options }, + getOperationSpec + ); + } + + /** + * Implements NetworkFabricSkus list by subscription GET method. + * @param options The options parameters. + */ + private _listBySubscription( + options?: NetworkFabricSkusListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: NetworkFabricSkusListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricSku + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.networkFabricSkuName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricSkusListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricSkusListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabrics.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabrics.ts new file mode 100644 index 000000000000..cbbdc78c3e7e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkFabrics.ts @@ -0,0 +1,968 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkFabrics } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkFabric, + NetworkFabricsListByResourceGroupNextOptionalParams, + NetworkFabricsListByResourceGroupOptionalParams, + NetworkFabricsListByResourceGroupResponse, + NetworkFabricsListBySubscriptionNextOptionalParams, + NetworkFabricsListBySubscriptionOptionalParams, + NetworkFabricsListBySubscriptionResponse, + NetworkFabricsCreateOptionalParams, + NetworkFabricsCreateResponse, + NetworkFabricsGetOptionalParams, + NetworkFabricsGetResponse, + NetworkFabricPatchParameters, + NetworkFabricsUpdateOptionalParams, + NetworkFabricsUpdateResponse, + NetworkFabricsDeleteOptionalParams, + NetworkFabricsProvisionOptionalParams, + NetworkFabricsProvisionResponse, + NetworkFabricsDeprovisionOptionalParams, + NetworkFabricsDeprovisionResponse, + NetworkFabricsListByResourceGroupNextResponse, + NetworkFabricsListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing NetworkFabrics operations. */ +export class NetworkFabricsImpl implements NetworkFabrics { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkFabrics class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * List all the Network Fabric resources in the given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: NetworkFabricsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: NetworkFabricsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkFabricsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: NetworkFabricsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List all the Network Fabric resources in the given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: NetworkFabricsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: NetworkFabricsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkFabricsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: NetworkFabricsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Create Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + networkFabricName: string, + body: NetworkFabric, + options?: NetworkFabricsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + NetworkFabricsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + networkFabricName: string, + body: NetworkFabric, + options?: NetworkFabricsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + networkFabricName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get Network Fabric resource details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkFabricName, options }, + getOperationSpec + ); + } + + /** + * Update certain properties of the Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param body Network Fabric properties to update. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + networkFabricName: string, + body: NetworkFabricPatchParameters, + options?: NetworkFabricsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NetworkFabricsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update certain properties of the Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param body Network Fabric properties to update. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + networkFabricName: string, + body: NetworkFabricPatchParameters, + options?: NetworkFabricsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + networkFabricName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkFabricName, + options + ); + return poller.pollUntilDone(); + } + + /** + * List all the Network Fabric resources in the given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: NetworkFabricsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List all the Network Fabric resources in the given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: NetworkFabricsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + async beginProvision( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsProvisionOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricsProvisionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricName, options }, + spec: provisionOperationSpec + }); + const poller = await createHttpPoller< + NetworkFabricsProvisionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Provisions the underlying resources in the given Network Fabric instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + async beginProvisionAndWait( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsProvisionOptionalParams + ): Promise { + const poller = await this.beginProvision( + resourceGroupName, + networkFabricName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + async beginDeprovision( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsDeprovisionOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricsDeprovisionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkFabricName, options }, + spec: deprovisionOperationSpec + }); + const poller = await createHttpPoller< + NetworkFabricsDeprovisionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + async beginDeprovisionAndWait( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsDeprovisionOptionalParams + ): Promise { + const poller = await this.beginDeprovision( + resourceGroupName, + networkFabricName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: NetworkFabricsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: NetworkFabricsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabric + }, + 201: { + bodyMapper: Mappers.NetworkFabric + }, + 202: { + bodyMapper: Mappers.NetworkFabric + }, + 204: { + bodyMapper: Mappers.NetworkFabric + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body26, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabric + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabric + }, + 201: { + bodyMapper: Mappers.NetworkFabric + }, + 202: { + bodyMapper: Mappers.NetworkFabric + }, + 204: { + bodyMapper: Mappers.NetworkFabric + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body27, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const provisionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.NetworkFabricsProvisionHeaders + }, + 201: { + headersMapper: Mappers.NetworkFabricsProvisionHeaders + }, + 202: { + headersMapper: Mappers.NetworkFabricsProvisionHeaders + }, + 204: { + headersMapper: Mappers.NetworkFabricsProvisionHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deprovisionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.NetworkFabricsDeprovisionHeaders + }, + 201: { + headersMapper: Mappers.NetworkFabricsDeprovisionHeaders + }, + 202: { + headersMapper: Mappers.NetworkFabricsDeprovisionHeaders + }, + 204: { + headersMapper: Mappers.NetworkFabricsDeprovisionHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkFabricsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkInterfaces.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkInterfaces.ts new file mode 100644 index 000000000000..24b0df4ff505 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkInterfaces.ts @@ -0,0 +1,936 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkInterfaces } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkInterface, + NetworkInterfacesListNextOptionalParams, + NetworkInterfacesListOptionalParams, + NetworkInterfacesListResponse, + NetworkInterfacesCreateOptionalParams, + NetworkInterfacesCreateResponse, + NetworkInterfacesGetOptionalParams, + NetworkInterfacesGetResponse, + NetworkInterfacePatch, + NetworkInterfacesUpdateOptionalParams, + NetworkInterfacesUpdateResponse, + NetworkInterfacesDeleteOptionalParams, + NetworkInterfacesGetStatusOptionalParams, + NetworkInterfacesGetStatusResponse, + UpdateAdministrativeState, + NetworkInterfacesUpdateAdministrativeStateOptionalParams, + NetworkInterfacesUpdateAdministrativeStateResponse, + NetworkInterfacesListNextResponse +} from "../models"; + +/// +/** Class containing NetworkInterfaces operations. */ +export class NetworkInterfacesImpl implements NetworkInterfaces { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkInterfaces class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * List all the Network Interface resources in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkInterfacesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + networkDeviceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + networkDeviceName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkInterfacesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkInterfacesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, networkDeviceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + networkDeviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkInterfacesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + networkDeviceName, + options + )) { + yield* page; + } + } + + /** + * Create a Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterface + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: NetworkInterface, + options?: NetworkInterfacesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + NetworkInterfacesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterface + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: NetworkInterface, + options?: NetworkInterfacesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get the Network Interface resource details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkDeviceName, networkInterfaceName, options }, + getOperationSpec + ); + } + + /** + * Update certain properties of the Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param body NetworkInterface properties to update. Only tags are supported. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: NetworkInterfacePatch, + options?: NetworkInterfacesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NetworkInterfacesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Update certain properties of the Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param body NetworkInterface properties to update. Only tags are supported. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: NetworkInterfacePatch, + options?: NetworkInterfacesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete the Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkDeviceName, + networkInterfaceName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete the Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * List all the Network Interface resources in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkInterfacesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkDeviceName, options }, + listOperationSpec + ); + } + + /** + * Get the running status of the Network Interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param networkInterfaceName Name of the NetworkInterface + * @param options The options parameters. + */ + async beginGetStatus( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetStatusOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesGetStatusResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkDeviceName, + networkInterfaceName, + options + }, + spec: getStatusOperationSpec + }); + const poller = await createHttpPoller< + NetworkInterfacesGetStatusResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Get the running status of the Network Interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param networkInterfaceName Name of the NetworkInterface + * @param options The options parameters. + */ + async beginGetStatusAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetStatusOptionalParams + ): Promise { + const poller = await this.beginGetStatus( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the admin state of the Network Interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param networkInterfaceName Name of the NetworkInterface + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeState( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: UpdateAdministrativeState, + options?: NetworkInterfacesUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesUpdateAdministrativeStateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body, + options + }, + spec: updateAdministrativeStateOperationSpec + }); + const poller = await createHttpPoller< + NetworkInterfacesUpdateAdministrativeStateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update the admin state of the Network Interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param networkInterfaceName Name of the NetworkInterface + * @param body Request payload. + * @param options The options parameters. + */ + async beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: UpdateAdministrativeState, + options?: NetworkInterfacesUpdateAdministrativeStateOptionalParams + ): Promise { + const poller = await this.beginUpdateAdministrativeState( + resourceGroupName, + networkDeviceName, + networkInterfaceName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + networkDeviceName: string, + nextLink: string, + options?: NetworkInterfacesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkDeviceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterface + }, + 201: { + bodyMapper: Mappers.NetworkInterface + }, + 202: { + bodyMapper: Mappers.NetworkInterface + }, + 204: { + bodyMapper: Mappers.NetworkInterface + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body22, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterface + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterface + }, + 201: { + bodyMapper: Mappers.NetworkInterface + }, + 202: { + bodyMapper: Mappers.NetworkInterface + }, + 204: { + bodyMapper: Mappers.NetworkInterface + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body23, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfacesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getStatusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/getStatus", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.InterfaceStatus, + headersMapper: Mappers.NetworkInterfacesGetStatusHeaders + }, + 201: { + bodyMapper: Mappers.InterfaceStatus, + headersMapper: Mappers.NetworkInterfacesGetStatusHeaders + }, + 202: { + bodyMapper: Mappers.InterfaceStatus, + headersMapper: Mappers.NetworkInterfacesGetStatusHeaders + }, + 204: { + bodyMapper: Mappers.InterfaceStatus, + headersMapper: Mappers.NetworkInterfacesGetStatusHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateAdministrativeStateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.NetworkInterfacesUpdateAdministrativeStateHeaders + }, + 201: { + headersMapper: Mappers.NetworkInterfacesUpdateAdministrativeStateHeaders + }, + 202: { + headersMapper: Mappers.NetworkInterfacesUpdateAdministrativeStateHeaders + }, + 204: { + headersMapper: Mappers.NetworkInterfacesUpdateAdministrativeStateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkDeviceName, + Parameters.networkInterfaceName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkInterfacesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.networkDeviceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkRackSkus.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkRackSkus.ts new file mode 100644 index 000000000000..7457145d69ac --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkRackSkus.ts @@ -0,0 +1,195 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkRackSkus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + NetworkRackSku, + NetworkRackSkusListBySubscriptionNextOptionalParams, + NetworkRackSkusListBySubscriptionOptionalParams, + NetworkRackSkusListBySubscriptionResponse, + NetworkRackSkusGetOptionalParams, + NetworkRackSkusGetResponse, + NetworkRackSkusListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing NetworkRackSkus operations. */ +export class NetworkRackSkusImpl implements NetworkRackSkus { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkRackSkus class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * List all Network Rack SKUs in the given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: NetworkRackSkusListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: NetworkRackSkusListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkRackSkusListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: NetworkRackSkusListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get Network Rack SKU resource. + * @param networkRackSkuName Name of the Network Rack Sku + * @param options The options parameters. + */ + get( + networkRackSkuName: string, + options?: NetworkRackSkusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { networkRackSkuName, options }, + getOperationSpec + ); + } + + /** + * List all Network Rack SKUs in the given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: NetworkRackSkusListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: NetworkRackSkusListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkRackSku + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.networkRackSkuName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkRackSkusListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkRackSkusListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkRacks.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkRacks.ts new file mode 100644 index 000000000000..d5b9180ada1d --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkRacks.ts @@ -0,0 +1,720 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkRacks } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkRack, + NetworkRacksListByResourceGroupNextOptionalParams, + NetworkRacksListByResourceGroupOptionalParams, + NetworkRacksListByResourceGroupResponse, + NetworkRacksListBySubscriptionNextOptionalParams, + NetworkRacksListBySubscriptionOptionalParams, + NetworkRacksListBySubscriptionResponse, + NetworkRacksCreateOptionalParams, + NetworkRacksCreateResponse, + NetworkRacksGetOptionalParams, + NetworkRacksGetResponse, + NetworkRackPatch, + NetworkRacksUpdateOptionalParams, + NetworkRacksUpdateResponse, + NetworkRacksDeleteOptionalParams, + NetworkRacksListByResourceGroupNextResponse, + NetworkRacksListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing NetworkRacks operations. */ +export class NetworkRacksImpl implements NetworkRacks { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkRacks class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * List all Network Rack resources in the given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: NetworkRacksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: NetworkRacksListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkRacksListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: NetworkRacksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List all Network Rack resources in the given subscription + * @param options The options parameters. + */ + public listBySubscription( + options?: NetworkRacksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: NetworkRacksListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkRacksListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: NetworkRacksListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Create Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + networkRackName: string, + body: NetworkRack, + options?: NetworkRacksCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkRacksCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkRackName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + NetworkRacksCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + networkRackName: string, + body: NetworkRack, + options?: NetworkRacksCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + networkRackName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get Network Rack resource details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkRackName: string, + options?: NetworkRacksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkRackName, options }, + getOperationSpec + ); + } + + /** + * Update certain properties of the Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param body Network Rack properties to update. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + networkRackName: string, + body: NetworkRackPatch, + options?: NetworkRacksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkRacksUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkRackName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NetworkRacksUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update certain properties of the Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param body Network Rack properties to update. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + networkRackName: string, + body: NetworkRackPatch, + options?: NetworkRacksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + networkRackName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkRackName: string, + options?: NetworkRacksDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkRackName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkRackName: string, + options?: NetworkRacksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkRackName, + options + ); + return poller.pollUntilDone(); + } + + /** + * List all Network Rack resources in the given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: NetworkRacksListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List all Network Rack resources in the given subscription + * @param options The options parameters. + */ + private _listBySubscription( + options?: NetworkRacksListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: NetworkRacksListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: NetworkRacksListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NetworkRack + }, + 201: { + bodyMapper: Mappers.NetworkRack + }, + 202: { + bodyMapper: Mappers.NetworkRack + }, + 204: { + bodyMapper: Mappers.NetworkRack + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body29, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkRackName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkRack + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkRackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.NetworkRack + }, + 201: { + bodyMapper: Mappers.NetworkRack + }, + 202: { + bodyMapper: Mappers.NetworkRack + }, + 204: { + bodyMapper: Mappers.NetworkRack + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body30, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkRackName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkRackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkRacksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkRacksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkRacksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkRacksListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkToNetworkInterconnects.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkToNetworkInterconnects.ts new file mode 100644 index 000000000000..222b71033a53 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/networkToNetworkInterconnects.ts @@ -0,0 +1,515 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { NetworkToNetworkInterconnects } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkToNetworkInterconnect, + NetworkToNetworkInterconnectsListNextOptionalParams, + NetworkToNetworkInterconnectsListOptionalParams, + NetworkToNetworkInterconnectsListResponse, + NetworkToNetworkInterconnectsCreateOptionalParams, + NetworkToNetworkInterconnectsCreateResponse, + NetworkToNetworkInterconnectsGetOptionalParams, + NetworkToNetworkInterconnectsGetResponse, + NetworkToNetworkInterconnectsDeleteOptionalParams, + NetworkToNetworkInterconnectsListNextResponse +} from "../models"; + +/// +/** Class containing NetworkToNetworkInterconnects operations. */ +export class NetworkToNetworkInterconnectsImpl + implements NetworkToNetworkInterconnects { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class NetworkToNetworkInterconnects class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Implements Network To Network Interconnects list by Network Fabric GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkToNetworkInterconnectsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + networkFabricName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + networkFabricName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkToNetworkInterconnectsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkToNetworkInterconnectsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, networkFabricName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + networkFabricName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkToNetworkInterconnectsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + networkFabricName, + options + )) { + yield* page; + } + } + + /** + * Configuration used to setup CE-PE connectivity PUT Method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + body: NetworkToNetworkInterconnect, + options?: NetworkToNetworkInterconnectsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkToNetworkInterconnectsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName, + body, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + NetworkToNetworkInterconnectsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Configuration used to setup CE-PE connectivity PUT Method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + body: NetworkToNetworkInterconnect, + options?: NetworkToNetworkInterconnectsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements NetworkToNetworkInterconnects GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + options?: NetworkToNetworkInterconnectsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName, + options + }, + getOperationSpec + ); + } + + /** + * Implements NetworkToNetworkInterconnects DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + options?: NetworkToNetworkInterconnectsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Implements NetworkToNetworkInterconnects DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + options?: NetworkToNetworkInterconnectsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + networkFabricName, + networkToNetworkInterconnectName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements Network To Network Interconnects list by Network Fabric GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkToNetworkInterconnectsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkFabricName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + networkFabricName: string, + nextLink: string, + options?: NetworkToNetworkInterconnectsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, networkFabricName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.NetworkToNetworkInterconnect + }, + 201: { + bodyMapper: Mappers.NetworkToNetworkInterconnect + }, + 202: { + bodyMapper: Mappers.NetworkToNetworkInterconnect + }, + 204: { + bodyMapper: Mappers.NetworkToNetworkInterconnect + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body28, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName, + Parameters.networkToNetworkInterconnectName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkToNetworkInterconnect + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName, + Parameters.networkToNetworkInterconnectName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName, + Parameters.networkToNetworkInterconnectName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkToNetworkInterconnectsList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkFabricName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkToNetworkInterconnectsList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.networkFabricName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/operations.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/operations.ts new file mode 100644 index 000000000000..485f02df9327 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/operations.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Returns list of all operations. + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Returns list of all operations. + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.ManagedNetworkFabric/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/routePolicies.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/routePolicies.ts new file mode 100644 index 000000000000..91202919526a --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operations/routePolicies.ts @@ -0,0 +1,720 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { RoutePolicies } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetworkFabricManagementServiceAPI } from "../azureNetworkFabricManagementServiceAPI"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + RoutePolicy, + RoutePoliciesListByResourceGroupNextOptionalParams, + RoutePoliciesListByResourceGroupOptionalParams, + RoutePoliciesListByResourceGroupResponse, + RoutePoliciesListBySubscriptionNextOptionalParams, + RoutePoliciesListBySubscriptionOptionalParams, + RoutePoliciesListBySubscriptionResponse, + RoutePoliciesCreateOptionalParams, + RoutePoliciesCreateResponse, + RoutePoliciesGetOptionalParams, + RoutePoliciesGetResponse, + RoutePolicyPatch, + RoutePoliciesUpdateOptionalParams, + RoutePoliciesUpdateResponse, + RoutePoliciesDeleteOptionalParams, + RoutePoliciesListByResourceGroupNextResponse, + RoutePoliciesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing RoutePolicies operations. */ +export class RoutePoliciesImpl implements RoutePolicies { + private readonly client: AzureNetworkFabricManagementServiceAPI; + + /** + * Initialize a new instance of the class RoutePolicies class. + * @param client Reference to the service client + */ + constructor(client: AzureNetworkFabricManagementServiceAPI) { + this.client = client; + } + + /** + * Implements RoutePolicies list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: RoutePoliciesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: RoutePoliciesListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: RoutePoliciesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: RoutePoliciesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Implements RoutePolicies list by subscription GET method. + * @param options The options parameters. + */ + public listBySubscription( + options?: RoutePoliciesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: RoutePoliciesListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: RoutePoliciesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: RoutePoliciesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Implements Route Policy PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + routePolicyName: string, + body: RoutePolicy, + options?: RoutePoliciesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + RoutePoliciesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, routePolicyName, body, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + RoutePoliciesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Implements Route Policy PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param body Request payload. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + routePolicyName: string, + body: RoutePolicy, + options?: RoutePoliciesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + routePolicyName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements Route Policy GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param options The options parameters. + */ + get( + resourceGroupName: string, + routePolicyName: string, + options?: RoutePoliciesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, routePolicyName, options }, + getOperationSpec + ); + } + + /** + * API to update certain properties of the Route Policy resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param body Route Policy properties to update. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + routePolicyName: string, + body: RoutePolicyPatch, + options?: RoutePoliciesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + RoutePoliciesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, routePolicyName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + RoutePoliciesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * API to update certain properties of the Route Policy resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param body Route Policy properties to update. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + routePolicyName: string, + body: RoutePolicyPatch, + options?: RoutePoliciesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + routePolicyName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements Route Policy DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + routePolicyName: string, + options?: RoutePoliciesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, routePolicyName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Implements Route Policy DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + routePolicyName: string, + options?: RoutePoliciesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + routePolicyName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Implements RoutePolicies list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: RoutePoliciesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Implements RoutePolicies list by subscription GET method. + * @param options The options parameters. + */ + private _listBySubscription( + options?: RoutePoliciesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: RoutePoliciesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: RoutePoliciesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.RoutePolicy + }, + 201: { + bodyMapper: Mappers.RoutePolicy + }, + 202: { + bodyMapper: Mappers.RoutePolicy + }, + 204: { + bodyMapper: Mappers.RoutePolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body31, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.routePolicyName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RoutePolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.routePolicyName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.RoutePolicy + }, + 201: { + bodyMapper: Mappers.RoutePolicy + }, + 202: { + bodyMapper: Mappers.RoutePolicy + }, + 204: { + bodyMapper: Mappers.RoutePolicy + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body32, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.routePolicyName + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.routePolicyName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RoutePoliciesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RoutePoliciesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RoutePoliciesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RoutePoliciesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/accessControlLists.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/accessControlLists.ts new file mode 100644 index 000000000000..dfb2a908ae3b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/accessControlLists.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + AccessControlList, + AccessControlListsListByResourceGroupOptionalParams, + AccessControlListsListBySubscriptionOptionalParams, + AccessControlListsCreateOptionalParams, + AccessControlListsCreateResponse, + AccessControlListsGetOptionalParams, + AccessControlListsGetResponse, + AccessControlListPatch, + AccessControlListsUpdateOptionalParams, + AccessControlListsUpdateResponse, + AccessControlListsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a AccessControlLists. */ +export interface AccessControlLists { + /** + * Implements AccessControlLists list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: AccessControlListsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements AccessControlLists list by subscription GET method. + * @param options The options parameters. + */ + listBySubscription( + options?: AccessControlListsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements Access Control List PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List + * @param body Request payload. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accessControlListName: string, + body: AccessControlList, + options?: AccessControlListsCreateOptionalParams + ): Promise; + /** + * Implements Access Control List GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accessControlListName: string, + options?: AccessControlListsGetOptionalParams + ): Promise; + /** + * API to update certain properties of the Access Control List resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List + * @param body Access Control List properties to update. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + accessControlListName: string, + body: AccessControlListPatch, + options?: AccessControlListsUpdateOptionalParams + ): Promise; + /** + * Implements Access Control List DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + accessControlListName: string, + options?: AccessControlListsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/externalNetworks.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/externalNetworks.ts new file mode 100644 index 000000000000..13f55ffb9403 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/externalNetworks.ts @@ -0,0 +1,336 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ExternalNetwork, + ExternalNetworksListOptionalParams, + ExternalNetworksCreateOptionalParams, + ExternalNetworksCreateResponse, + ExternalNetworksGetOptionalParams, + ExternalNetworksGetResponse, + ExternalNetworkPatch, + ExternalNetworksUpdateOptionalParams, + ExternalNetworksUpdateResponse, + ExternalNetworksDeleteOptionalParams, + UpdateAdministrativeState, + ExternalNetworksUpdateAdministrativeStateOptionalParams, + ExternalNetworksUpdateAdministrativeStateResponse, + ExternalNetworksUpdateBgpAdministrativeStateOptionalParams, + ExternalNetworksUpdateBgpAdministrativeStateResponse, + ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams, + ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse, + EnableDisableOnResources, + ExternalNetworksClearIpv6NeighborsOptionalParams, + ExternalNetworksClearIpv6NeighborsResponse, + ExternalNetworksClearArpEntriesOptionalParams, + ExternalNetworksClearArpEntriesResponse +} from "../models"; + +/// +/** Interface representing a ExternalNetworks. */ +export interface ExternalNetworks { + /** + * Implements External Networks list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param options The options parameters. + */ + list( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: ExternalNetworksListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates ExternalNetwork PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: ExternalNetwork, + options?: ExternalNetworksCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksCreateResponse + > + >; + /** + * Creates ExternalNetwork PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: ExternalNetwork, + options?: ExternalNetworksCreateOptionalParams + ): Promise; + /** + * Implements ExternalNetworks GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param options The options parameters. + */ + get( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + options?: ExternalNetworksGetOptionalParams + ): Promise; + /** + * API to update certain properties of the ExternalNetworks resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: ExternalNetworkPatch, + options?: ExternalNetworksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksUpdateResponse + > + >; + /** + * API to update certain properties of the ExternalNetworks resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: ExternalNetworkPatch, + options?: ExternalNetworksUpdateOptionalParams + ): Promise; + /** + * Implements ExternalNetworks DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + options?: ExternalNetworksDeleteOptionalParams + ): Promise, void>>; + /** + * Implements ExternalNetworks DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param externalNetworkName Name of the ExternalNetwork + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + options?: ExternalNetworksDeleteOptionalParams + ): Promise; + /** + * Executes update operation to enable or disable administrative State for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksUpdateAdministrativeStateResponse + > + >; + /** + * Executes update operation to enable or disable administrative State for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateAdministrativeStateOptionalParams + ): Promise; + /** + * Update BGP for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBgpAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateBgpAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksUpdateBgpAdministrativeStateResponse + > + >; + /** + * Update BGP for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateBgpAdministrativeStateOptionalParams + ): Promise; + /** + * Update BfdForBgp for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBfdForBgpAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse + >, + ExternalNetworksUpdateBfdForBgpAdministrativeStateResponse + > + >; + /** + * Update BfdForBgp for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: UpdateAdministrativeState, + options?: ExternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + ): Promise; + /** + * clearIpv6Neighbors for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearIpv6Neighbors( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: EnableDisableOnResources, + options?: ExternalNetworksClearIpv6NeighborsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksClearIpv6NeighborsResponse + > + >; + /** + * clearIpv6Neighbors for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearIpv6NeighborsAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: EnableDisableOnResources, + options?: ExternalNetworksClearIpv6NeighborsOptionalParams + ): Promise; + /** + * clearArpEntries for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearArpEntries( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: EnableDisableOnResources, + options?: ExternalNetworksClearArpEntriesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExternalNetworksClearArpEntriesResponse + > + >; + /** + * clearArpEntries for externalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param externalNetworkName Name of the ExternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearArpEntriesAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + externalNetworkName: string, + body: EnableDisableOnResources, + options?: ExternalNetworksClearArpEntriesOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/index.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..44f8aef51253 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/index.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./accessControlLists"; +export * from "./ipCommunities"; +export * from "./ipExtendedCommunities"; +export * from "./ipPrefixes"; +export * from "./l2IsolationDomains"; +export * from "./l3IsolationDomains"; +export * from "./internalNetworks"; +export * from "./externalNetworks"; +export * from "./networkDeviceSkus"; +export * from "./networkDevices"; +export * from "./networkInterfaces"; +export * from "./networkFabricControllers"; +export * from "./networkFabricSkus"; +export * from "./networkFabrics"; +export * from "./networkToNetworkInterconnects"; +export * from "./networkRackSkus"; +export * from "./networkRacks"; +export * from "./operations"; +export * from "./routePolicies"; diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/internalNetworks.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/internalNetworks.ts new file mode 100644 index 000000000000..44ee067c66b5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/internalNetworks.ts @@ -0,0 +1,377 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + InternalNetwork, + InternalNetworksListOptionalParams, + InternalNetworksCreateOptionalParams, + InternalNetworksCreateResponse, + InternalNetworksGetOptionalParams, + InternalNetworksGetResponse, + InternalNetworkPatch, + InternalNetworksUpdateOptionalParams, + InternalNetworksUpdateResponse, + InternalNetworksDeleteOptionalParams, + UpdateAdministrativeState, + InternalNetworksUpdateAdministrativeStateOptionalParams, + InternalNetworksUpdateAdministrativeStateResponse, + InternalNetworksUpdateBgpAdministrativeStateOptionalParams, + InternalNetworksUpdateBgpAdministrativeStateResponse, + InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams, + InternalNetworksUpdateBfdForBgpAdministrativeStateResponse, + EnableDisableOnResources, + InternalNetworksClearIpv6NeighborsOptionalParams, + InternalNetworksClearIpv6NeighborsResponse, + InternalNetworksClearArpEntriesOptionalParams, + InternalNetworksClearArpEntriesResponse, + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams, + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse +} from "../models"; + +/// +/** Interface representing a InternalNetworks. */ +export interface InternalNetworks { + /** + * Displays InternalNetworks list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param options The options parameters. + */ + list( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: InternalNetworksListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates InternalNetwork PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: InternalNetwork, + options?: InternalNetworksCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksCreateResponse + > + >; + /** + * Creates InternalNetwork PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: InternalNetwork, + options?: InternalNetworksCreateOptionalParams + ): Promise; + /** + * Gets a InternalNetworks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param options The options parameters. + */ + get( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + options?: InternalNetworksGetOptionalParams + ): Promise; + /** + * Updates a InternalNetworks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param body InternalNetwork properties to update. Only annotations are supported. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: InternalNetworkPatch, + options?: InternalNetworksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksUpdateResponse + > + >; + /** + * Updates a InternalNetworks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param body InternalNetwork properties to update. Only annotations are supported. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: InternalNetworkPatch, + options?: InternalNetworksUpdateOptionalParams + ): Promise; + /** + * Implements InternalNetworks DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + options?: InternalNetworksDeleteOptionalParams + ): Promise, void>>; + /** + * Implements InternalNetworks DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain + * @param internalNetworkName Name of the InternalNetwork + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + options?: InternalNetworksDeleteOptionalParams + ): Promise; + /** + * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksUpdateAdministrativeStateResponse + > + >; + /** + * Update Administrative state of InternalNetworks on resources referred by their resource ids. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateAdministrativeStateOptionalParams + ): Promise; + /** + * Update BGP state for internalNetwork. Allowed only on edge devices. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBgpAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBgpAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksUpdateBgpAdministrativeStateResponse + > + >; + /** + * Update BGP state for internalNetwork. Allowed only on edge devices. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBgpAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBgpAdministrativeStateOptionalParams + ): Promise; + /** + * Update BfdForBgp for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBfdForBgpAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + InternalNetworksUpdateBfdForBgpAdministrativeStateResponse + >, + InternalNetworksUpdateBfdForBgpAdministrativeStateResponse + > + >; + /** + * Update BfdForBgp for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBfdForBgpAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBfdForBgpAdministrativeStateOptionalParams + ): Promise; + /** + * clearIpv6Neighbors for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearIpv6Neighbors( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: EnableDisableOnResources, + options?: InternalNetworksClearIpv6NeighborsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksClearIpv6NeighborsResponse + > + >; + /** + * clearIpv6Neighbors for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearIpv6NeighborsAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: EnableDisableOnResources, + options?: InternalNetworksClearIpv6NeighborsOptionalParams + ): Promise; + /** + * clearArpEntries for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearArpEntries( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: EnableDisableOnResources, + options?: InternalNetworksClearArpEntriesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InternalNetworksClearArpEntriesResponse + > + >; + /** + * clearArpEntries for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearArpEntriesAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: EnableDisableOnResources, + options?: InternalNetworksClearArpEntriesOptionalParams + ): Promise; + /** + * Update BfdForStaticRoutes for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBfdForStaticRouteAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse + >, + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse + > + >; + /** + * Update BfdForStaticRoutes for internalNetwork. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param internalNetworkName Name of the InternalNetwork. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateBfdForStaticRouteAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + internalNetworkName: string, + body: UpdateAdministrativeState, + options?: InternalNetworksUpdateBfdForStaticRouteAdministrativeStateOptionalParams + ): Promise< + InternalNetworksUpdateBfdForStaticRouteAdministrativeStateResponse + >; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipCommunities.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipCommunities.ts new file mode 100644 index 000000000000..667cd331da82 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipCommunities.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + IpCommunity, + IpCommunitiesListByResourceGroupOptionalParams, + IpCommunitiesListBySubscriptionOptionalParams, + IpCommunitiesCreateOptionalParams, + IpCommunitiesCreateResponse, + IpCommunitiesGetOptionalParams, + IpCommunitiesGetResponse, + IpCommunityPatch, + IpCommunitiesUpdateOptionalParams, + IpCommunitiesUpdateResponse, + IpCommunitiesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a IpCommunities. */ +export interface IpCommunities { + /** + * Implements IpCommunities list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: IpCommunitiesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements IpCommunities list by subscription GET method. + * @param options The options parameters. + */ + listBySubscription( + options?: IpCommunitiesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements an IP Community PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + ipCommunityName: string, + body: IpCommunity, + options?: IpCommunitiesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpCommunitiesCreateResponse + > + >; + /** + * Implements an IP Community PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + ipCommunityName: string, + body: IpCommunity, + options?: IpCommunitiesCreateOptionalParams + ): Promise; + /** + * Implements an IP Community GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + ipCommunityName: string, + options?: IpCommunitiesGetOptionalParams + ): Promise; + /** + * API to update certain properties of the IP Community resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community + * @param body IP Community properties to update. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + ipCommunityName: string, + body: IpCommunityPatch, + options?: IpCommunitiesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpCommunitiesUpdateResponse + > + >; + /** + * API to update certain properties of the IP Community resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community + * @param body IP Community properties to update. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + ipCommunityName: string, + body: IpCommunityPatch, + options?: IpCommunitiesUpdateOptionalParams + ): Promise; + /** + * Implements IP Community DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + ipCommunityName: string, + options?: IpCommunitiesDeleteOptionalParams + ): Promise, void>>; + /** + * Implements IP Community DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipCommunityName Name of the IP Community. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + ipCommunityName: string, + options?: IpCommunitiesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipExtendedCommunities.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipExtendedCommunities.ts new file mode 100644 index 000000000000..08b24cbaf9c3 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipExtendedCommunities.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + IpExtendedCommunity, + IpExtendedCommunitiesListByResourceGroupOptionalParams, + IpExtendedCommunitiesListBySubscriptionOptionalParams, + IpExtendedCommunitiesCreateOptionalParams, + IpExtendedCommunitiesCreateResponse, + IpExtendedCommunitiesGetOptionalParams, + IpExtendedCommunitiesGetResponse, + IpExtendedCommunityPatch, + IpExtendedCommunitiesUpdateOptionalParams, + IpExtendedCommunitiesUpdateResponse, + IpExtendedCommunitiesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a IpExtendedCommunities. */ +export interface IpExtendedCommunities { + /** + * Implements IpExtendedCommunities list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: IpExtendedCommunitiesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements IpExtendedCommunities list by subscription GET method. + * @param options The options parameters. + */ + listBySubscription( + options?: IpExtendedCommunitiesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements IP Extended Community PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + ipExtendedCommunityName: string, + body: IpExtendedCommunity, + options?: IpExtendedCommunitiesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpExtendedCommunitiesCreateResponse + > + >; + /** + * Implements IP Extended Community PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + ipExtendedCommunityName: string, + body: IpExtendedCommunity, + options?: IpExtendedCommunitiesCreateOptionalParams + ): Promise; + /** + * Implements IP Extended Community GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param options The options parameters. + */ + get( + resourceGroupName: string, + ipExtendedCommunityName: string, + options?: IpExtendedCommunitiesGetOptionalParams + ): Promise; + /** + * API to update certain properties of the IP Extended Community resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param body IP Extended Community properties to update. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + ipExtendedCommunityName: string, + body: IpExtendedCommunityPatch, + options?: IpExtendedCommunitiesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpExtendedCommunitiesUpdateResponse + > + >; + /** + * API to update certain properties of the IP Extended Community resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param body IP Extended Community properties to update. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + ipExtendedCommunityName: string, + body: IpExtendedCommunityPatch, + options?: IpExtendedCommunitiesUpdateOptionalParams + ): Promise; + /** + * Implements IP Extended Community DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + ipExtendedCommunityName: string, + options?: IpExtendedCommunitiesDeleteOptionalParams + ): Promise, void>>; + /** + * Implements IP Extended Community DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipExtendedCommunityName Name of the IP Extended Community + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + ipExtendedCommunityName: string, + options?: IpExtendedCommunitiesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipPrefixes.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipPrefixes.ts new file mode 100644 index 000000000000..f6befd14f062 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/ipPrefixes.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + IpPrefix, + IpPrefixesListByResourceGroupOptionalParams, + IpPrefixesListBySubscriptionOptionalParams, + IpPrefixesCreateOptionalParams, + IpPrefixesCreateResponse, + IpPrefixesGetOptionalParams, + IpPrefixesGetResponse, + IpPrefixPatch, + IpPrefixesUpdateOptionalParams, + IpPrefixesUpdateResponse, + IpPrefixesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a IpPrefixes. */ +export interface IpPrefixes { + /** + * Implements IpPrefixes list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: IpPrefixesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements IpPrefixes list by subscription GET method. + * @param options The options parameters. + */ + listBySubscription( + options?: IpPrefixesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements IP Prefix PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + ipPrefixName: string, + body: IpPrefix, + options?: IpPrefixesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpPrefixesCreateResponse + > + >; + /** + * Implements IP Prefix PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + ipPrefixName: string, + body: IpPrefix, + options?: IpPrefixesCreateOptionalParams + ): Promise; + /** + * Implements IP Prefix GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param options The options parameters. + */ + get( + resourceGroupName: string, + ipPrefixName: string, + options?: IpPrefixesGetOptionalParams + ): Promise; + /** + * API to update certain properties of the IP Prefix resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param body IP Prefix properties to update. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + ipPrefixName: string, + body: IpPrefixPatch, + options?: IpPrefixesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + IpPrefixesUpdateResponse + > + >; + /** + * API to update certain properties of the IP Prefix resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param body IP Prefix properties to update. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + ipPrefixName: string, + body: IpPrefixPatch, + options?: IpPrefixesUpdateOptionalParams + ): Promise; + /** + * Implements IP Prefix DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + ipPrefixName: string, + options?: IpPrefixesDeleteOptionalParams + ): Promise, void>>; + /** + * Implements IP Prefix DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ipPrefixName Name of the IP Prefix + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + ipPrefixName: string, + options?: IpPrefixesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/l2IsolationDomains.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/l2IsolationDomains.ts new file mode 100644 index 000000000000..102e8bfc1dbd --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/l2IsolationDomains.ts @@ -0,0 +1,271 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + L2IsolationDomain, + L2IsolationDomainsListByResourceGroupOptionalParams, + L2IsolationDomainsListBySubscriptionOptionalParams, + L2IsolationDomainsCreateOptionalParams, + L2IsolationDomainsCreateResponse, + L2IsolationDomainsGetOptionalParams, + L2IsolationDomainsGetResponse, + L2IsolationDomainPatch, + L2IsolationDomainsUpdateOptionalParams, + L2IsolationDomainsUpdateResponse, + L2IsolationDomainsDeleteOptionalParams, + UpdateAdministrativeState, + L2IsolationDomainsUpdateAdministrativeStateOptionalParams, + L2IsolationDomainsUpdateAdministrativeStateResponse, + EnableDisableOnResources, + L2IsolationDomainsClearArpTableOptionalParams, + L2IsolationDomainsClearArpTableResponse, + L2IsolationDomainsClearNeighborTableOptionalParams, + L2IsolationDomainsClearNeighborTableResponse, + L2IsolationDomainsGetArpEntriesOptionalParams, + L2IsolationDomainsGetArpEntriesResponse +} from "../models"; + +/// +/** Interface representing a L2IsolationDomains. */ +export interface L2IsolationDomains { + /** + * Displays L2IsolationDomains list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: L2IsolationDomainsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Displays L2IsolationDomains list by subscription GET method. + * @param options The options parameters. + */ + listBySubscription( + options?: L2IsolationDomainsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + * configuration is applied on the devices only after the isolation domain is enabled. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + l2IsolationDomainName: string, + body: L2IsolationDomain, + options?: L2IsolationDomainsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsCreateResponse + > + >; + /** + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + * configuration is applied on the devices only after the isolation domain is enabled. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: L2IsolationDomain, + options?: L2IsolationDomainsCreateOptionalParams + ): Promise; + /** + * Implements L2 Isolation Domain GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param options The options parameters. + */ + get( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsGetOptionalParams + ): Promise; + /** + * API to update certain properties of the L2 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + l2IsolationDomainName: string, + body: L2IsolationDomainPatch, + options?: L2IsolationDomainsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsUpdateResponse + > + >; + /** + * API to update certain properties of the L2 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: L2IsolationDomainPatch, + options?: L2IsolationDomainsUpdateOptionalParams + ): Promise; + /** + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsDeleteOptionalParams + ): Promise; + /** + * Enables isolation domain across the fabric or on specified racks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeState( + resourceGroupName: string, + l2IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L2IsolationDomainsUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsUpdateAdministrativeStateResponse + > + >; + /** + * Enables isolation domain across the fabric or on specified racks. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L2IsolationDomainsUpdateAdministrativeStateOptionalParams + ): Promise; + /** + * Clears ARP tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearArpTable( + resourceGroupName: string, + l2IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L2IsolationDomainsClearArpTableOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsClearArpTableResponse + > + >; + /** + * Clears ARP tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearArpTableAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L2IsolationDomainsClearArpTableOptionalParams + ): Promise; + /** + * Clears IPv6 neighbors for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearNeighborTable( + resourceGroupName: string, + l2IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L2IsolationDomainsClearNeighborTableOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsClearNeighborTableResponse + > + >; + /** + * Clears IPv6 neighbors for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearNeighborTableAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L2IsolationDomainsClearNeighborTableOptionalParams + ): Promise; + /** + * Clears IPv6 neighbors for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param options The options parameters. + */ + beginGetArpEntries( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsGetArpEntriesOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L2IsolationDomainsGetArpEntriesResponse + > + >; + /** + * Clears IPv6 neighbors for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param options The options parameters. + */ + beginGetArpEntriesAndWait( + resourceGroupName: string, + l2IsolationDomainName: string, + options?: L2IsolationDomainsGetArpEntriesOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/l3IsolationDomains.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/l3IsolationDomains.ts new file mode 100644 index 000000000000..a79aa073d73b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/l3IsolationDomains.ts @@ -0,0 +1,279 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + L3IsolationDomain, + L3IsolationDomainsListByResourceGroupOptionalParams, + L3IsolationDomainsListBySubscriptionOptionalParams, + L3IsolationDomainsCreateOptionalParams, + L3IsolationDomainsCreateResponse, + L3IsolationDomainsGetOptionalParams, + L3IsolationDomainsGetResponse, + L3IsolationDomainPatch, + L3IsolationDomainsUpdateOptionalParams, + L3IsolationDomainsUpdateResponse, + L3IsolationDomainsDeleteOptionalParams, + UpdateAdministrativeState, + L3IsolationDomainsUpdateAdministrativeStateOptionalParams, + L3IsolationDomainsUpdateAdministrativeStateResponse, + L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams, + L3IsolationDomainsUpdateOptionBAdministrativeStateResponse, + EnableDisableOnResources, + L3IsolationDomainsClearArpTableOptionalParams, + L3IsolationDomainsClearArpTableResponse, + L3IsolationDomainsClearNeighborTableOptionalParams, + L3IsolationDomainsClearNeighborTableResponse +} from "../models"; + +/// +/** Interface representing a L3IsolationDomains. */ +export interface L3IsolationDomains { + /** + * Displays L3IsolationDomains list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: L3IsolationDomainsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Displays L3IsolationDomains list by subscription GET method. + * @param options The options parameters. + */ + listBySubscription( + options?: L3IsolationDomainsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create isolation domain resources for layer 3 connectivity between compute nodes and for + * communication with external services .This configuration is applied on the devices only after the + * creation of networks is completed and isolation domain is enabled. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + l3IsolationDomainName: string, + body: L3IsolationDomain, + options?: L3IsolationDomainsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsCreateResponse + > + >; + /** + * Create isolation domain resources for layer 3 connectivity between compute nodes and for + * communication with external services .This configuration is applied on the devices only after the + * creation of networks is completed and isolation domain is enabled. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: L3IsolationDomain, + options?: L3IsolationDomainsCreateOptionalParams + ): Promise; + /** + * Retrieves details of this L3 Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param options The options parameters. + */ + get( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: L3IsolationDomainsGetOptionalParams + ): Promise; + /** + * API to update certain properties of the L3 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + l3IsolationDomainName: string, + body: L3IsolationDomainPatch, + options?: L3IsolationDomainsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsUpdateResponse + > + >; + /** + * API to update certain properties of the L3 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: L3IsolationDomainPatch, + options?: L3IsolationDomainsUpdateOptionalParams + ): Promise; + /** + * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: L3IsolationDomainsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3 Isolation Domain + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + options?: L3IsolationDomainsDeleteOptionalParams + ): Promise; + /** + * Enables racks for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L3IsolationDomainsUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsUpdateAdministrativeStateResponse + > + >; + /** + * Enables racks for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L3IsolationDomainsUpdateAdministrativeStateOptionalParams + ): Promise; + /** + * Update administrative state of option B on CE devices + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateOptionBAdministrativeState( + resourceGroupName: string, + l3IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + L3IsolationDomainsUpdateOptionBAdministrativeStateResponse + >, + L3IsolationDomainsUpdateOptionBAdministrativeStateResponse + > + >; + /** + * Update administrative state of option B on CE devices + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateOptionBAdministrativeStateAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: UpdateAdministrativeState, + options?: L3IsolationDomainsUpdateOptionBAdministrativeStateOptionalParams + ): Promise; + /** + * Clears ARP tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearArpTable( + resourceGroupName: string, + l3IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L3IsolationDomainsClearArpTableOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsClearArpTableResponse + > + >; + /** + * Clears ARP tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearArpTableAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L3IsolationDomainsClearArpTableOptionalParams + ): Promise; + /** + * Clears IPv6 neighbor tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearNeighborTable( + resourceGroupName: string, + l3IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L3IsolationDomainsClearNeighborTableOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + L3IsolationDomainsClearNeighborTableResponse + > + >; + /** + * Clears IPv6 neighbor tables for this Isolation Domain. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param body Request payload. + * @param options The options parameters. + */ + beginClearNeighborTableAndWait( + resourceGroupName: string, + l3IsolationDomainName: string, + body: EnableDisableOnResources, + options?: L3IsolationDomainsClearNeighborTableOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkDeviceSkus.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkDeviceSkus.ts new file mode 100644 index 000000000000..c5c30b3aebf9 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkDeviceSkus.ts @@ -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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + NetworkDeviceSku, + NetworkDeviceSkusListBySubscriptionOptionalParams, + NetworkDeviceSkusGetOptionalParams, + NetworkDeviceSkusGetResponse +} from "../models"; + +/// +/** Interface representing a NetworkDeviceSkus. */ +export interface NetworkDeviceSkus { + /** + * List Network Device SKUs for the given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: NetworkDeviceSkusListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get Network Device SKU details. + * @param networkDeviceSkuName Name of the Network Device Sku + * @param options The options parameters. + */ + get( + networkDeviceSkuName: string, + options?: NetworkDeviceSkusGetOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkDevices.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkDevices.ts new file mode 100644 index 000000000000..faf463258416 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkDevices.ts @@ -0,0 +1,381 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkDevice, + NetworkDevicesListByResourceGroupOptionalParams, + NetworkDevicesListBySubscriptionOptionalParams, + NetworkDevicesCreateOptionalParams, + NetworkDevicesCreateResponse, + NetworkDevicesGetOptionalParams, + NetworkDevicesGetResponse, + NetworkDevicePatchParameters, + NetworkDevicesUpdateOptionalParams, + NetworkDevicesUpdateResponse, + NetworkDevicesDeleteOptionalParams, + NetworkDevicesRebootOptionalParams, + NetworkDevicesRebootResponse, + NetworkDevicesRestoreConfigOptionalParams, + NetworkDevicesRestoreConfigResponse, + UpdateVersionProperties, + NetworkDevicesUpdateVersionOptionalParams, + NetworkDevicesUpdateVersionResponse, + NetworkDevicesGenerateSupportPackageOptionalParams, + NetworkDevicesGenerateSupportPackageResponse, + UpdatePowerCycleProperties, + NetworkDevicesUpdatePowerCycleOptionalParams, + NetworkDevicesUpdatePowerCycleResponse, + NetworkDevicesGetStatusOptionalParams, + NetworkDevicesGetStatusResponse, + NetworkDevicesGetStaticInterfaceMapsOptionalParams, + NetworkDevicesGetStaticInterfaceMapsResponse, + NetworkDevicesGetDynamicInterfaceMapsOptionalParams, + NetworkDevicesGetDynamicInterfaceMapsResponse +} from "../models"; + +/// +/** Interface representing a NetworkDevices. */ +export interface NetworkDevices { + /** + * List all the Network Device resources in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: NetworkDevicesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List all the Network Device resources in a given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: NetworkDevicesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create a Network Device resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + networkDeviceName: string, + body: NetworkDevice, + options?: NetworkDevicesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesCreateResponse + > + >; + /** + * Create a Network Device resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + networkDeviceName: string, + body: NetworkDevice, + options?: NetworkDevicesCreateOptionalParams + ): Promise; + /** + * Get the Network Device resource details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetOptionalParams + ): Promise; + /** + * Update certain properties of the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param body Network Device properties to update. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + networkDeviceName: string, + body: NetworkDevicePatchParameters, + options?: NetworkDevicesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesUpdateResponse + > + >; + /** + * Update certain properties of the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param body Network Device properties to update. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + networkDeviceName: string, + body: NetworkDevicePatchParameters, + options?: NetworkDevicesUpdateOptionalParams + ): Promise; + /** + * Delete the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesDeleteOptionalParams + ): Promise; + /** + * Reboot the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginReboot( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesRebootOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesRebootResponse + > + >; + /** + * Reboot the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginRebootAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesRebootOptionalParams + ): Promise; + /** + * Restore the configuration of the Network Device resource to last known good configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginRestoreConfig( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesRestoreConfigOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesRestoreConfigResponse + > + >; + /** + * Restore the configuration of the Network Device resource to last known good configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginRestoreConfigAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesRestoreConfigOptionalParams + ): Promise; + /** + * Update the SKU version of the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateVersion( + resourceGroupName: string, + networkDeviceName: string, + body: UpdateVersionProperties, + options?: NetworkDevicesUpdateVersionOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesUpdateVersionResponse + > + >; + /** + * Update the SKU version of the Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateVersionAndWait( + resourceGroupName: string, + networkDeviceName: string, + body: UpdateVersionProperties, + options?: NetworkDevicesUpdateVersionOptionalParams + ): Promise; + /** + * Generate Support Package for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginGenerateSupportPackage( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGenerateSupportPackageOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesGenerateSupportPackageResponse + > + >; + /** + * Generate Support Package for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginGenerateSupportPackageAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGenerateSupportPackageOptionalParams + ): Promise; + /** + * Update PDU power cycle of the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdatePowerCycle( + resourceGroupName: string, + networkDeviceName: string, + body: UpdatePowerCycleProperties, + options?: NetworkDevicesUpdatePowerCycleOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesUpdatePowerCycleResponse + > + >; + /** + * Update PDU power cycle of the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdatePowerCycleAndWait( + resourceGroupName: string, + networkDeviceName: string, + body: UpdatePowerCycleProperties, + options?: NetworkDevicesUpdatePowerCycleOptionalParams + ): Promise; + /** + * Get the running status of the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginGetStatus( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetStatusOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesGetStatusResponse + > + >; + /** + * Get the running status of the Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginGetStatusAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetStatusOptionalParams + ): Promise; + /** + * Get the static interface maps for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginGetStaticInterfaceMaps( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetStaticInterfaceMapsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesGetStaticInterfaceMapsResponse + > + >; + /** + * Get the static interface maps for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginGetStaticInterfaceMapsAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetStaticInterfaceMapsOptionalParams + ): Promise; + /** + * Get the dynamic interface maps for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginGetDynamicInterfaceMaps( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetDynamicInterfaceMapsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkDevicesGetDynamicInterfaceMapsResponse + > + >; + /** + * Get the dynamic interface maps for the given Network Device. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + beginGetDynamicInterfaceMapsAndWait( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkDevicesGetDynamicInterfaceMapsOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabricControllers.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabricControllers.ts new file mode 100644 index 000000000000..51322dc6b1bb --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabricControllers.ts @@ -0,0 +1,201 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkFabricController, + NetworkFabricControllersListByResourceGroupOptionalParams, + NetworkFabricControllersListBySubscriptionOptionalParams, + NetworkFabricControllersCreateOptionalParams, + NetworkFabricControllersCreateResponse, + NetworkFabricControllersGetOptionalParams, + NetworkFabricControllersGetResponse, + NetworkFabricControllerPatch, + NetworkFabricControllersUpdateOptionalParams, + NetworkFabricControllersUpdateResponse, + NetworkFabricControllersDeleteOptionalParams, + NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams, + NetworkFabricControllersEnableWorkloadManagementNetworkResponse, + NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams, + NetworkFabricControllersDisableWorkloadManagementNetworkResponse +} from "../models"; + +/// +/** Interface representing a NetworkFabricControllers. */ +export interface NetworkFabricControllers { + /** + * Lists all the NetworkFabricControllers thats available in the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: NetworkFabricControllersListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all the NetworkFabricControllers by subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: NetworkFabricControllersListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates a Network Fabric Controller. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + networkFabricControllerName: string, + body: NetworkFabricController, + options?: NetworkFabricControllersCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricControllersCreateResponse + > + >; + /** + * Creates a Network Fabric Controller. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + body: NetworkFabricController, + options?: NetworkFabricControllersCreateOptionalParams + ): Promise; + /** + * Shows the provisioning status of Network Fabric Controller. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersGetOptionalParams + ): Promise; + /** + * Updates are currently not supported for the Network Fabric Controller resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param body Network Fabric Controller properties to update. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + networkFabricControllerName: string, + body: NetworkFabricControllerPatch, + options?: NetworkFabricControllersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricControllersUpdateResponse + > + >; + /** + * Updates are currently not supported for the Network Fabric Controller resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param body Network Fabric Controller properties to update. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + body: NetworkFabricControllerPatch, + options?: NetworkFabricControllersUpdateOptionalParams + ): Promise; + /** + * Deletes the Network Fabric Controller resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the Network Fabric Controller resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the Network Fabric Controller + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersDeleteOptionalParams + ): Promise; + /** + * Enables the workloadManagementNetwork (Tenant Network). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the networkFabricController. + * @param options The options parameters. + */ + beginEnableWorkloadManagementNetwork( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + NetworkFabricControllersEnableWorkloadManagementNetworkResponse + >, + NetworkFabricControllersEnableWorkloadManagementNetworkResponse + > + >; + /** + * Enables the workloadManagementNetwork (Tenant Network). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the networkFabricController. + * @param options The options parameters. + */ + beginEnableWorkloadManagementNetworkAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersEnableWorkloadManagementNetworkOptionalParams + ): Promise; + /** + * Disables the workloadManagementNetwork (Tenant Network). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the networkFabricController. + * @param options The options parameters. + */ + beginDisableWorkloadManagementNetwork( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams + ): Promise< + SimplePollerLike< + OperationState< + NetworkFabricControllersDisableWorkloadManagementNetworkResponse + >, + NetworkFabricControllersDisableWorkloadManagementNetworkResponse + > + >; + /** + * Disables the workloadManagementNetwork (Tenant Network). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricControllerName Name of the networkFabricController. + * @param options The options parameters. + */ + beginDisableWorkloadManagementNetworkAndWait( + resourceGroupName: string, + networkFabricControllerName: string, + options?: NetworkFabricControllersDisableWorkloadManagementNetworkOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabricSkus.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabricSkus.ts new file mode 100644 index 000000000000..83c6b82c4fe5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabricSkus.ts @@ -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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + NetworkFabricSku, + NetworkFabricSkusListBySubscriptionOptionalParams, + NetworkFabricSkusGetOptionalParams, + NetworkFabricSkusGetResponse +} from "../models"; + +/// +/** Interface representing a NetworkFabricSkus. */ +export interface NetworkFabricSkus { + /** + * Implements NetworkFabricSkus list by subscription GET method. + * @param options The options parameters. + */ + listBySubscription( + options?: NetworkFabricSkusListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements Network Fabric Sku GET method. + * @param networkFabricSkuName Name of the Network Fabric Sku + * @param options The options parameters. + */ + get( + networkFabricSkuName: string, + options?: NetworkFabricSkusGetOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabrics.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabrics.ts new file mode 100644 index 000000000000..a480a06f3a9f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkFabrics.ts @@ -0,0 +1,197 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkFabric, + NetworkFabricsListByResourceGroupOptionalParams, + NetworkFabricsListBySubscriptionOptionalParams, + NetworkFabricsCreateOptionalParams, + NetworkFabricsCreateResponse, + NetworkFabricsGetOptionalParams, + NetworkFabricsGetResponse, + NetworkFabricPatchParameters, + NetworkFabricsUpdateOptionalParams, + NetworkFabricsUpdateResponse, + NetworkFabricsDeleteOptionalParams, + NetworkFabricsProvisionOptionalParams, + NetworkFabricsProvisionResponse, + NetworkFabricsDeprovisionOptionalParams, + NetworkFabricsDeprovisionResponse +} from "../models"; + +/// +/** Interface representing a NetworkFabrics. */ +export interface NetworkFabrics { + /** + * List all the Network Fabric resources in the given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: NetworkFabricsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List all the Network Fabric resources in the given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: NetworkFabricsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + networkFabricName: string, + body: NetworkFabric, + options?: NetworkFabricsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricsCreateResponse + > + >; + /** + * Create Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + networkFabricName: string, + body: NetworkFabric, + options?: NetworkFabricsCreateOptionalParams + ): Promise; + /** + * Get Network Fabric resource details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsGetOptionalParams + ): Promise; + /** + * Update certain properties of the Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param body Network Fabric properties to update. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + networkFabricName: string, + body: NetworkFabricPatchParameters, + options?: NetworkFabricsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricsUpdateResponse + > + >; + /** + * Update certain properties of the Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param body Network Fabric properties to update. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + networkFabricName: string, + body: NetworkFabricPatchParameters, + options?: NetworkFabricsUpdateOptionalParams + ): Promise; + /** + * Delete Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete Network Fabric resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsDeleteOptionalParams + ): Promise; + /** + * Provisions the underlying resources in the given Network Fabric instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + beginProvision( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsProvisionOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricsProvisionResponse + > + >; + /** + * Provisions the underlying resources in the given Network Fabric instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + beginProvisionAndWait( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsProvisionOptionalParams + ): Promise; + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + beginDeprovision( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsDeprovisionOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkFabricsDeprovisionResponse + > + >; + /** + * Deprovisions the underlying resources in the given Network Fabric instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + beginDeprovisionAndWait( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkFabricsDeprovisionOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkInterfaces.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkInterfaces.ts new file mode 100644 index 000000000000..970e8779d4a4 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkInterfaces.ts @@ -0,0 +1,218 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkInterface, + NetworkInterfacesListOptionalParams, + NetworkInterfacesCreateOptionalParams, + NetworkInterfacesCreateResponse, + NetworkInterfacesGetOptionalParams, + NetworkInterfacesGetResponse, + NetworkInterfacePatch, + NetworkInterfacesUpdateOptionalParams, + NetworkInterfacesUpdateResponse, + NetworkInterfacesDeleteOptionalParams, + NetworkInterfacesGetStatusOptionalParams, + NetworkInterfacesGetStatusResponse, + UpdateAdministrativeState, + NetworkInterfacesUpdateAdministrativeStateOptionalParams, + NetworkInterfacesUpdateAdministrativeStateResponse +} from "../models"; + +/// +/** Interface representing a NetworkInterfaces. */ +export interface NetworkInterfaces { + /** + * List all the Network Interface resources in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + networkDeviceName: string, + options?: NetworkInterfacesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create a Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterface + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: NetworkInterface, + options?: NetworkInterfacesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesCreateResponse + > + >; + /** + * Create a Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterface + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: NetworkInterface, + options?: NetworkInterfacesCreateOptionalParams + ): Promise; + /** + * Get the Network Interface resource details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetOptionalParams + ): Promise; + /** + * Update certain properties of the Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param body NetworkInterface properties to update. Only tags are supported. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: NetworkInterfacePatch, + options?: NetworkInterfacesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesUpdateResponse + > + >; + /** + * Update certain properties of the Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param body NetworkInterface properties to update. Only tags are supported. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: NetworkInterfacePatch, + options?: NetworkInterfacesUpdateOptionalParams + ): Promise; + /** + * Delete the Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete the Network Interface resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice + * @param networkInterfaceName Name of the NetworkInterfaceName + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesDeleteOptionalParams + ): Promise; + /** + * Get the running status of the Network Interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param networkInterfaceName Name of the NetworkInterface + * @param options The options parameters. + */ + beginGetStatus( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetStatusOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesGetStatusResponse + > + >; + /** + * Get the running status of the Network Interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param networkInterfaceName Name of the NetworkInterface + * @param options The options parameters. + */ + beginGetStatusAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + options?: NetworkInterfacesGetStatusOptionalParams + ): Promise; + /** + * Update the admin state of the Network Interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param networkInterfaceName Name of the NetworkInterface + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeState( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: UpdateAdministrativeState, + options?: NetworkInterfacesUpdateAdministrativeStateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkInterfacesUpdateAdministrativeStateResponse + > + >; + /** + * Update the admin state of the Network Interface. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the NetworkDevice. + * @param networkInterfaceName Name of the NetworkInterface + * @param body Request payload. + * @param options The options parameters. + */ + beginUpdateAdministrativeStateAndWait( + resourceGroupName: string, + networkDeviceName: string, + networkInterfaceName: string, + body: UpdateAdministrativeState, + options?: NetworkInterfacesUpdateAdministrativeStateOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkRackSkus.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkRackSkus.ts new file mode 100644 index 000000000000..2e79a20c28d7 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkRackSkus.ts @@ -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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + NetworkRackSku, + NetworkRackSkusListBySubscriptionOptionalParams, + NetworkRackSkusGetOptionalParams, + NetworkRackSkusGetResponse +} from "../models"; + +/// +/** Interface representing a NetworkRackSkus. */ +export interface NetworkRackSkus { + /** + * List all Network Rack SKUs in the given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: NetworkRackSkusListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get Network Rack SKU resource. + * @param networkRackSkuName Name of the Network Rack Sku + * @param options The options parameters. + */ + get( + networkRackSkuName: string, + options?: NetworkRackSkusGetOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkRacks.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkRacks.ts new file mode 100644 index 000000000000..988e0fa5de51 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkRacks.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkRack, + NetworkRacksListByResourceGroupOptionalParams, + NetworkRacksListBySubscriptionOptionalParams, + NetworkRacksCreateOptionalParams, + NetworkRacksCreateResponse, + NetworkRacksGetOptionalParams, + NetworkRacksGetResponse, + NetworkRackPatch, + NetworkRacksUpdateOptionalParams, + NetworkRacksUpdateResponse, + NetworkRacksDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a NetworkRacks. */ +export interface NetworkRacks { + /** + * List all Network Rack resources in the given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: NetworkRacksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List all Network Rack resources in the given subscription + * @param options The options parameters. + */ + listBySubscription( + options?: NetworkRacksListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + networkRackName: string, + body: NetworkRack, + options?: NetworkRacksCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkRacksCreateResponse + > + >; + /** + * Create Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + networkRackName: string, + body: NetworkRack, + options?: NetworkRacksCreateOptionalParams + ): Promise; + /** + * Get Network Rack resource details. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkRackName: string, + options?: NetworkRacksGetOptionalParams + ): Promise; + /** + * Update certain properties of the Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param body Network Rack properties to update. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + networkRackName: string, + body: NetworkRackPatch, + options?: NetworkRacksUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkRacksUpdateResponse + > + >; + /** + * Update certain properties of the Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param body Network Rack properties to update. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + networkRackName: string, + body: NetworkRackPatch, + options?: NetworkRacksUpdateOptionalParams + ): Promise; + /** + * Delete Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkRackName: string, + options?: NetworkRacksDeleteOptionalParams + ): Promise, void>>; + /** + * Delete Network Rack resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkRackName Name of the Network Rack + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkRackName: string, + options?: NetworkRacksDeleteOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkToNetworkInterconnects.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkToNetworkInterconnects.ts new file mode 100644 index 000000000000..8903d2a51c2f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/networkToNetworkInterconnects.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkToNetworkInterconnect, + NetworkToNetworkInterconnectsListOptionalParams, + NetworkToNetworkInterconnectsCreateOptionalParams, + NetworkToNetworkInterconnectsCreateResponse, + NetworkToNetworkInterconnectsGetOptionalParams, + NetworkToNetworkInterconnectsGetResponse, + NetworkToNetworkInterconnectsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a NetworkToNetworkInterconnects. */ +export interface NetworkToNetworkInterconnects { + /** + * Implements Network To Network Interconnects list by Network Fabric GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + networkFabricName: string, + options?: NetworkToNetworkInterconnectsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Configuration used to setup CE-PE connectivity PUT Method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + body: NetworkToNetworkInterconnect, + options?: NetworkToNetworkInterconnectsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + NetworkToNetworkInterconnectsCreateResponse + > + >; + /** + * Configuration used to setup CE-PE connectivity PUT Method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + body: NetworkToNetworkInterconnect, + options?: NetworkToNetworkInterconnectsCreateOptionalParams + ): Promise; + /** + * Implements NetworkToNetworkInterconnects GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect + * @param options The options parameters. + */ + get( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + options?: NetworkToNetworkInterconnectsGetOptionalParams + ): Promise; + /** + * Implements NetworkToNetworkInterconnects DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + options?: NetworkToNetworkInterconnectsDeleteOptionalParams + ): Promise, void>>; + /** + * Implements NetworkToNetworkInterconnects DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the NetworkFabric. + * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + networkFabricName: string, + networkToNetworkInterconnectName: string, + options?: NetworkToNetworkInterconnectsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/operations.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..b0b35b8f194b --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Returns list of all operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/routePolicies.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/routePolicies.ts new file mode 100644 index 000000000000..edaf18fd9e3c --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/operationsInterfaces/routePolicies.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + RoutePolicy, + RoutePoliciesListByResourceGroupOptionalParams, + RoutePoliciesListBySubscriptionOptionalParams, + RoutePoliciesCreateOptionalParams, + RoutePoliciesCreateResponse, + RoutePoliciesGetOptionalParams, + RoutePoliciesGetResponse, + RoutePolicyPatch, + RoutePoliciesUpdateOptionalParams, + RoutePoliciesUpdateResponse, + RoutePoliciesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a RoutePolicies. */ +export interface RoutePolicies { + /** + * Implements RoutePolicies list by resource group GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: RoutePoliciesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements RoutePolicies list by subscription GET method. + * @param options The options parameters. + */ + listBySubscription( + options?: RoutePoliciesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Implements Route Policy PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param body Request payload. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + routePolicyName: string, + body: RoutePolicy, + options?: RoutePoliciesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + RoutePoliciesCreateResponse + > + >; + /** + * Implements Route Policy PUT method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param body Request payload. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + routePolicyName: string, + body: RoutePolicy, + options?: RoutePoliciesCreateOptionalParams + ): Promise; + /** + * Implements Route Policy GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param options The options parameters. + */ + get( + resourceGroupName: string, + routePolicyName: string, + options?: RoutePoliciesGetOptionalParams + ): Promise; + /** + * API to update certain properties of the Route Policy resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param body Route Policy properties to update. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + routePolicyName: string, + body: RoutePolicyPatch, + options?: RoutePoliciesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + RoutePoliciesUpdateResponse + > + >; + /** + * API to update certain properties of the Route Policy resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param body Route Policy properties to update. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + routePolicyName: string, + body: RoutePolicyPatch, + options?: RoutePoliciesUpdateOptionalParams + ): Promise; + /** + * Implements Route Policy DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + routePolicyName: string, + options?: RoutePoliciesDeleteOptionalParams + ): Promise, void>>; + /** + * Implements Route Policy DELETE method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + routePolicyName: string, + options?: RoutePoliciesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/src/pagingHelper.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/src/pagingHelper.ts new file mode 100644 index 000000000000..269a2b9814b5 --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from + * that point later. + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. + */ +export function getContinuationToken(page: unknown): string | undefined { + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken( + page: unknown, + continuationToken: string | undefined +): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/test/managednetworkfabric_operations_test.spec.ts b/sdk/managednetworkfabric/arm-managednetworkfabric/test/managednetworkfabric_operations_test.spec.ts new file mode 100644 index 000000000000..2c99c1b3747e --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/test/managednetworkfabric_operations_test.spec.ts @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + Recorder, + RecorderStartOptions, + delay, + isPlaybackMode, +} from "@azure-tools/test-recorder"; +import { createTestCredential } from "@azure-tools/test-credential"; +import { assert } from "chai"; +import { Context } from "mocha"; +import { AzureNetworkFabricManagementServiceAPI } from "../src/azureNetworkFabricManagementServiceAPI"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +export const testPollingOptions = { + updateIntervalInMs: isPlaybackMode() ? 0 : undefined, +}; + +describe("managednetworkfabric test", () => { + let recorder: Recorder; + let subscriptionId: string; + let client: AzureNetworkFabricManagementServiceAPI; + let location: string; + let resourceGroup: string; + let resourcename: string; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + subscriptionId = env.SUBSCRIPTION_ID || ''; + // This is an example of how the environment variables are used + const credential = createTestCredential(); + client = new AzureNetworkFabricManagementServiceAPI(credential, subscriptionId, recorder.configureClientOptions({})); + location = "eastus"; + resourceGroup = "myjstest"; + resourcename = "resourcetest"; + + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it.skip("accessControlLists create test", async function () { + const res = await client.accessControlLists.create( + resourceGroup, + resourcename, + { + addressFamily: "ipv4", + conditions: [ + { + action: "allow", + destinationAddress: "1.1.1.1", + destinationPort: "21", + sequenceNumber: 3, + sourceAddress: "2.2.2.2", + sourcePort: "65000", + protocol: 6 + } + ], + location + }); + assert.equal(res.name, resourcename); + }); + + it.skip("accessControlLists get test", async function () { + const res = await client.accessControlLists.get(resourceGroup, + resourcename); + assert.equal(res.name, resourcename); + }); + + it.skip("accessControlLists list test", async function () { + const resArray = new Array(); + for await (let item of client.accessControlLists.listByResourceGroup(resourceGroup)) { + resArray.push(item); + } + assert.equal(resArray.length, 1); + }); + + it.skip("accessControlLists delete test", async function () { + const resArray = new Array(); + const res = await client.accessControlLists.delete(resourceGroup, resourcename + ) + for await (let item of client.accessControlLists.listByResourceGroup(resourceGroup)) { + resArray.push(item); + } + assert.equal(resArray.length, 0); + }); + + it("operation list test", async function () { + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + assert.notEqual(resArray.length, 0); + }); +}) diff --git a/sdk/managednetworkfabric/arm-managednetworkfabric/tsconfig.json b/sdk/managednetworkfabric/arm-managednetworkfabric/tsconfig.json new file mode 100644 index 000000000000..37656d71185f --- /dev/null +++ b/sdk/managednetworkfabric/arm-managednetworkfabric/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true, + "paths": { + "@azure/arm-managednetworkfabric": [ + "./src/index" + ] + } + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts", + "samples-dev/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/ci.mgmt.yml b/sdk/managednetworkfabric/ci.mgmt.yml new file mode 100644 index 000000000000..a596eec46318 --- /dev/null +++ b/sdk/managednetworkfabric/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/managednetworkfabric/arm-managednetworkfabric + - sdk/managednetworkfabric/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/managednetworkfabric/arm-managednetworkfabric + - sdk/managednetworkfabric/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: managednetworkfabric + Artifacts: + - name: azure-arm-managednetworkfabric + safeName: azurearmmanagednetworkfabric + \ No newline at end of file