diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ec75050d3823..739a027ee459 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -706,6 +706,19 @@ packages: - supports-color dev: false + /@azure-tools/test-recorder/2.0.0: + resolution: {integrity: sha512-OTic1OwOk25B8ecdMQ4wgyDaUNMMw0qzO4/0sy9ScPXWLmUFGMlkS0+BOQ2K9t8WCksM/wU+NjUZo/5T4zaG6A==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/core-auth': 1.4.0 + '@azure/core-http': 2.3.1 + '@azure/core-rest-pipeline': 1.10.2 + '@azure/core-util': 1.2.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + /@azure/abort-controller/1.1.0: resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} engines: {node: '>=12.0.0'} @@ -3872,7 +3885,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230316 + typescript: 5.1.0-dev.20230319 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8728,8 +8741,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230316: - resolution: {integrity: sha512-XQP4u67mBfrcRRfdyT3yvOAlCYlC0fERQOt9wwinZVALcj0BNO+7d7U1SVxzbb6RhXGEQ+xUgSIXxKXuHBZ0xw==} + /typescript/5.1.0-dev.20230319: + resolution: {integrity: sha512-FXvEX/Gu32p9d9mrGi4dElMwScMYxDANO7pAFZclzWTrvLHLWttoL4va+9fWngqqNLa0sKa3pray7nEQ4mqU+g==} engines: {node: '>=12.20'} hasBin: true dev: false @@ -13113,10 +13126,11 @@ packages: dev: false file:projects/arm-mobilenetwork.tgz: - resolution: {integrity: sha512-IxNfWN5+x9Lu01Dfm3/ZA6ux3pPPOIOsTIR0pDSE9z2ssscWf44pt2LXSXGY45SqwGnXJaqEAe667JfmibuQFQ==, tarball: file:projects/arm-mobilenetwork.tgz} + resolution: {integrity: sha512-wZy+ua9UaQdJx+OF8G1v3Yi5DXSkkA5so/v1trpz948VsH4SjLF98Tt1ZdxYPQb5g31206zesSrlPeL0MhgIiw==, tarball: file:projects/arm-mobilenetwork.tgz} name: '@rush-temp/arm-mobilenetwork' version: 0.0.0 dependencies: + '@azure-tools/test-recorder': 2.0.0 '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.4_@types+node@14.18.37 '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 @@ -13128,7 +13142,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - mkdirp: 1.0.4 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -13137,6 +13151,7 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: + - encoding - supports-color dev: false @@ -13310,7 +13325,7 @@ packages: dev: false file:projects/arm-network-1.tgz: - resolution: {integrity: sha512-h69TQy3Jv3Sq4nOUUoQ1PqUMQ5vPWhMxTAhPG2D0ci1lXMpmDgg0eLov6oGX5/Q1uzaa4yXyc4OToGLF7p3BBA==, tarball: file:projects/arm-network-1.tgz} + resolution: {integrity: sha512-HP4VbHNAjhBlsVcszfjybzzFd7MlgIBwbEnYhkPOk+uNySUPuU1whPAIPsgcbAkwf90ulTjitwCRSmBdf91Zhg==, tarball: file:projects/arm-network-1.tgz} name: '@rush-temp/arm-network-1' version: 0.0.0 dependencies: @@ -13335,7 +13350,6 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - - encoding - supports-color dev: false @@ -15297,7 +15311,7 @@ packages: dev: false file:projects/arm-webpubsub.tgz: - resolution: {integrity: sha512-EjFMfROIleuK8B/I2xiUMpXg9aBaxGkT+2uR4P51hS5oe+lmBVqnCJ8dlkGKbauBdwBqjt6jxeouvPWmCHBbjA==, tarball: file:projects/arm-webpubsub.tgz} + resolution: {integrity: sha512-p2yKPQQABjap5rsdwWPO/pDmLhwsEZfsd5KjA7TU/rb+kwJu3OG6ZCfBsJj6OIT5+0ZuVabpLVOQgZCJzTVxRw==, tarball: file:projects/arm-webpubsub.tgz} name: '@rush-temp/arm-webpubsub' version: 0.0.0 dependencies: @@ -15322,7 +15336,6 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - - encoding - supports-color dev: false @@ -15516,7 +15529,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - eslint: 8.35.0 + eslint: 8.36.0 events: 3.3.0 inherits: 2.0.4 karma: 6.4.1 @@ -16911,7 +16924,7 @@ packages: dev: false file:projects/event-hubs.tgz: - resolution: {integrity: sha512-19yBgs9YYynzl6fcHlrWVHrqz+5BQlzWhXk8R3s70JGbf7ZvQRCznNpM6n7MHUZU/n1OnqPB4Bw0tt+ADqxtQg==, tarball: file:projects/event-hubs.tgz} + resolution: {integrity: sha512-5TzCX3EbyrKQTJlA9IvX6pwajWdeU/5wOtqYoq6r/1DGoI87ffCek+ws57UkSExMwKw0gg6E1wDG0uFUMpzcPQ==, tarball: file:projects/event-hubs.tgz} name: '@rush-temp/event-hubs' version: 0.0.0 dependencies: @@ -18708,7 +18721,7 @@ packages: dev: false file:projects/purview-catalog.tgz: - resolution: {integrity: sha512-CDsjXqFGupMq0gzPE3/csKlbb8MNxiYJRR8xPFHN5gdBP/s/L1BFIorrkoQtMQlcP3P1kMZ55xYE2LjDhghoaA==, tarball: file:projects/purview-catalog.tgz} + resolution: {integrity: sha512-KSgoaNzAARvMZe+/C+cL5ZLL5HfxjBUTqU9RUpqJelsMsMP6yAwUdy2w9Ve9t66SdDvEwuGZd3jm6e8ucXwXIw==, tarball: file:projects/purview-catalog.tgz} name: '@rush-temp/purview-catalog' version: 0.0.0 dependencies: @@ -19056,7 +19069,7 @@ packages: dev: false file:projects/service-bus.tgz: - resolution: {integrity: sha512-capTfQmTOxtimRb9xqcMuZE6wAVbDx1EK+GllnqYjLm3+sMfyB71R9JLbhN0ncmTeweJVv5/RnKxTbAsJUNSEw==, tarball: file:projects/service-bus.tgz} + resolution: {integrity: sha512-WsequaezjWAVEEDEhVWOq+MwN7tcmgtiCPZS4o7B4HuT2u9JW90z0k2uJTkQzhwozGU/G1GFai8EJw5xIAoxZA==, tarball: file:projects/service-bus.tgz} name: '@rush-temp/service-bus' version: 0.0.0 dependencies: diff --git a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md index d5b076f7adbf..9b5b134cacf4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md @@ -1,15 +1,13 @@ # Release History + +## 3.0.0 (2023-03-20) + +**Breaking Changes** -## 2.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Enum KnownBillingSku no longer has value G3 + - Enum KnownBillingSku no longer has value G4 + + ## 2.0.0 (2023-01-06) **Features** diff --git a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json index cfb800cbf00c..3007144e3df0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json @@ -1,8 +1,8 @@ { - "commit": "340d577969b7bff5ad0488d79543314bc17daa50", + "commit": "53ff69b701210af819cc33e2cd9b380d0a36a673", "readme": "specification/mobilenetwork/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=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mobilenetwork\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.6.20221226.1 --generate-sample=true", + "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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/mobilenetwork/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.9", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.6.20221226.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.9" } \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/package.json b/sdk/mobilenetwork/arm-mobilenetwork/package.json index 9f3d73b1507d..3dd19fb7a898 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/package.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MobileNetworkManagementClient.", - "version": "2.0.1", + "version": "3.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,7 +33,7 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~4.8.0", @@ -41,7 +41,7 @@ "rimraf": "^3.0.0", "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", "@types/chai": "^4.2.8", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork" +} \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/recordings/node/my_test/recording_sample_test.json b/sdk/mobilenetwork/arm-mobilenetwork/recordings/node/my_test/recording_sample_test.json deleted file mode 100644 index f721723386d8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/recordings/node/my_test/recording_sample_test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Entries": [], - "Variables": {} -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md index da51762ebea2..4bf097a4ab89 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md @@ -6,9 +6,9 @@ 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 { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export interface Ambr { @@ -64,9 +64,9 @@ export interface AttachedDataNetworkResourceId { // @public export interface AttachedDataNetworks { - beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams): Promise, AttachedDataNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams): Promise, AttachedDataNetworksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams): Promise; get(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksGetOptionalParams): Promise; listByPacketCoreDataPlane(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: AttachedDataNetworksListByPacketCoreDataPlaneOptionalParams): PagedAsyncIterableIterator; @@ -206,9 +206,9 @@ export interface DataNetworkResourceId { // @public export interface DataNetworks { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams): Promise, DataNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams): Promise, DataNetworksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: DataNetworksListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; @@ -336,8 +336,6 @@ export enum KnownBillingSku { G1 = "G1", G10 = "G10", G2 = "G2", - G3 = "G3", - G4 = "G4", G5 = "G5" } @@ -553,9 +551,9 @@ export interface MobileNetworkResourceId { // @public export interface MobileNetworks { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams): Promise, MobileNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams): Promise, MobileNetworksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: MobileNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -705,15 +703,15 @@ export interface PacketCoreControlPlaneListResult { // @public export interface PacketCoreControlPlanes { - beginCollectDiagnosticsPackage(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams): Promise, PacketCoreControlPlanesCollectDiagnosticsPackageResponse>>; + beginCollectDiagnosticsPackage(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams): Promise, PacketCoreControlPlanesCollectDiagnosticsPackageResponse>>; beginCollectDiagnosticsPackageAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreControlPlanesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreControlPlanesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams): Promise; - beginReinstall(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams): Promise, PacketCoreControlPlanesReinstallResponse>>; + beginReinstall(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams): Promise, PacketCoreControlPlanesReinstallResponse>>; beginReinstallAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams): Promise; - beginRollback(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams): Promise, PacketCoreControlPlanesRollbackResponse>>; + beginRollback(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams): Promise, PacketCoreControlPlanesRollbackResponse>>; beginRollbackAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams): Promise; get(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: PacketCoreControlPlanesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -858,9 +856,9 @@ export interface PacketCoreDataPlaneListResult { // @public export interface PacketCoreDataPlanes { - beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreDataPlanesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreDataPlanesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams): Promise; get(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesGetOptionalParams): Promise; listByPacketCoreControlPlane(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreDataPlanesListByPacketCoreControlPlaneOptionalParams): PagedAsyncIterableIterator; @@ -1041,9 +1039,9 @@ export interface ServiceResourceId { // @public export interface Services { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, serviceName: string, parameters: Service, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, serviceName: string, parameters: Service, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, serviceName: string, parameters: Service, options?: ServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, serviceName: string, options?: ServicesGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: ServicesListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; @@ -1137,9 +1135,9 @@ export interface SimGroupResourceId { // @public export interface SimGroups { - beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams): Promise, SimGroupsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams): Promise, SimGroupsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, simGroupName: string, parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams): Promise; get(resourceGroupName: string, simGroupName: string, options?: SimGroupsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: SimGroupsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -1249,9 +1247,9 @@ export interface SimNameAndProperties { // @public export interface SimPolicies { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams): Promise, SimPoliciesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams): Promise, SimPoliciesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: SimPoliciesListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; @@ -1333,15 +1331,15 @@ export interface SimPropertiesFormat extends CommonSimPropertiesFormat { // @public export interface Sims { - beginBulkDelete(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams): Promise, SimsBulkDeleteResponse>>; + beginBulkDelete(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams): Promise, SimsBulkDeleteResponse>>; beginBulkDeleteAndWait(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams): Promise; - beginBulkUpload(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimsBulkUploadOptionalParams): Promise, SimsBulkUploadResponse>>; + beginBulkUpload(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimsBulkUploadOptionalParams): Promise, SimsBulkUploadResponse>>; beginBulkUploadAndWait(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimsBulkUploadOptionalParams): Promise; - beginBulkUploadEncrypted(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams): Promise, SimsBulkUploadEncryptedResponse>>; + beginBulkUploadEncrypted(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams): Promise, SimsBulkUploadEncryptedResponse>>; beginBulkUploadEncryptedAndWait(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise, SimsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise, SimsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise; get(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsGetOptionalParams): Promise; listByGroup(resourceGroupName: string, simGroupName: string, options?: SimsListByGroupOptionalParams): PagedAsyncIterableIterator; @@ -1452,9 +1450,9 @@ export interface SiteResourceId { // @public export interface Sites { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: Site, options?: SitesCreateOrUpdateOptionalParams): Promise, SitesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: Site, options?: SitesCreateOrUpdateOptionalParams): Promise, SitesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: Site, options?: SitesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, siteName: string, options?: SitesGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: SitesListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; @@ -1531,9 +1529,9 @@ export interface SliceResourceId { // @public export interface Slices { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, sliceName: string, parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams): Promise, SlicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, sliceName: string, parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams): Promise, SlicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, sliceName: string, parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, sliceName: string, options?: SlicesGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: SlicesListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 791c63bdec48..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AttachedDataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * - * @summary Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters: AttachedDataNetwork = { - dnsAddresses: ["1.1.1.1"], - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 30, tcp: 180, udp: 30 }, - portRange: { maxPort: 49999, minPort: 1024 }, - portReuseHoldTime: { tcp: 120, udp: 60 } - }, - userEquipmentAddressPoolPrefix: ["2.2.0.0/16"], - userEquipmentStaticAddressPoolPrefix: ["2.4.0.0/16"], - userPlaneDataInterface: { name: "N6" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksDeleteSample.ts deleted file mode 100644 index e30cf94458c7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified attached data network. - * - * @summary Deletes the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - deleteAttachedDataNetworkResource(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksGetSample.ts deleted file mode 100644 index b6badff4dcb2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksGetSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified attached data network. - * - * @summary Gets information about the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - getAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksListByPacketCoreDataPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksListByPacketCoreDataPlaneSample.ts deleted file mode 100644 index 744af2341db7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksListByPacketCoreDataPlaneSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the attached data networks associated with a packet core data plane. - * - * @summary Gets all the attached data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.attachedDataNetworks.listByPacketCoreDataPlane( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAttachedDataNetworksInADataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksUpdateTagsSample.ts deleted file mode 100644 index e3b12165d513..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an attached data network tags. - * - * @summary Updates an attached data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateAttachedDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 983eb31c63e4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a data network. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a data network. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters: DataNetwork = { - description: "myFavouriteDataNetwork", - location: "eastus" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksDeleteSample.ts deleted file mode 100644 index c37d17fb818b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified data network. - * - * @summary Deletes the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - deleteDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksGetSample.ts deleted file mode 100644 index c305a7fae7b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified data network. - * - * @summary Gets information about the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.get( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - getDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksListByMobileNetworkSample.ts deleted file mode 100644 index f558493bee5d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data networks in the mobile network. - * - * @summary Lists all data networks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataNetworks.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataNetworksInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksUpdateTagsSample.ts deleted file mode 100644 index 4b6edda19847..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 7ba80547b2ae..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MobileNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network. - * - * @summary Creates or updates a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters: MobileNetwork = { - location: "eastus", - publicLandMobileNetworkIdentifier: { mcc: "001", mnc: "01" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksDeleteSample.ts deleted file mode 100644 index 2e35d2a808a2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network. - * - * @summary Deletes the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - deleteMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksGetSample.ts deleted file mode 100644 index f8bb34b1370f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network. - * - * @summary Gets information about the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.get( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - getMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListByResourceGroupSample.ts deleted file mode 100644 index 348fc0ea2d4c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a resource group. - * - * @summary Lists all the mobile networks in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListBySubscriptionSample.ts deleted file mode 100644 index e91d8627cc38..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a subscription. - * - * @summary Lists all the mobile networks in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksUpdateTagsSample.ts deleted file mode 100644 index d86c8fe08f93..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/operationsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/operationsListSample.ts deleted file mode 100644 index 7d825d29dfc5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of the operations. - * - * @summary Gets a list of the operations. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getRegistrationOperations(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsGetSample.ts deleted file mode 100644 index 1ce3132540dc..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane version. - * - * @summary Gets information about the specified packet core control plane version. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const versionName = "PMN-4-11-1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlaneVersions.get(versionName); - console.log(result); -} - -async function main() { - getPacketCoreControlPlaneVersion(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListSample.ts deleted file mode 100644 index 63dad3ce3740..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all supported packet core control planes versions. - * - * @summary Lists all supported packet core control planes versions. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlaneVersions.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getSupportedPacketCoreControlPlaneVersions(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts deleted file mode 100644 index 8e131575a9d9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlaneCollectDiagnosticsPackage, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * - * @summary Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json - */ -async function collectDiagnosticsPackageFromPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlaneCollectDiagnosticsPackage = { - storageAccountBlobUrl: - "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.ts deleted file mode 100644 index 94ba54de44c9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a packet core control plane. - * - * @summary Creates or updates a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlane = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - authenticationType: "AAD", - httpsServerCertificate: { - certificateUrl: - "https://contosovault.vault.azure.net/certificates/ingress" - } - }, - location: "eastus", - platform: { - type: "AKS-HCI", - azureStackEdgeDevice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice" - }, - connectedCluster: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster" - }, - customLocation: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation" - } - }, - sites: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite" - } - ], - sku: "G0", - ueMtu: 1600, - version: "0.2.0" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesDeleteSample.ts deleted file mode 100644 index 49f71c97173d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified packet core control plane. - * - * @summary Deletes the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesGetSample.ts deleted file mode 100644 index 3ea686ce575a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane. - * - * @summary Gets information about the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.get( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListByResourceGroupSample.ts deleted file mode 100644 index e90c72ed77b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a resource group. - * - * @summary Lists all the packet core control planes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListBySubscriptionSample.ts deleted file mode 100644 index fb15bca1e86c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a subscription. - * - * @summary Lists all the packet core control planes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesReinstallSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesReinstallSample.ts deleted file mode 100644 index 53c444c08243..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesReinstallSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * - * @summary Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json - */ -async function reinstallPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesRollbackSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesRollbackSample.ts deleted file mode 100644 index e5cc4c226ddd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesRollbackSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * - * @summary Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json - */ -async function rollbackPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesUpdateTagsSample.ts deleted file mode 100644 index f39687caf496..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates packet core control planes tags. - * - * @summary Updates packet core control planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreControlPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesCreateOrUpdateSample.ts deleted file mode 100644 index edd571d456d6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreDataPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * - * @summary Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters: PacketCoreDataPlane = { - location: "eastus", - userPlaneAccessInterface: { name: "N3" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesDeleteSample.ts deleted file mode 100644 index 2a2549793ced..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified packet core data plane. - * - * @summary Deletes the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesGetSample.ts deleted file mode 100644 index d11c47f32dd7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core data plane. - * - * @summary Gets information about the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts deleted file mode 100644 index 241fc5e80d5a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core data planes associated with a packet core control plane. - * - * @summary Lists all the packet core data planes associated with a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreDataPlanes.listByPacketCoreControlPlane( - resourceGroupName, - packetCoreControlPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreDataPlanesInAControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesUpdateTagsSample.ts deleted file mode 100644 index 0e9f7219fb45..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates packet core data planes tags. - * - * @summary Updates packet core data planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreDataPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesCreateOrUpdateSample.ts deleted file mode 100644 index 2da2d56bdfbd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Service, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a service. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a service. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters: Service = { - location: "eastus", - pccRules: [ - { - ruleName: "default-rule", - rulePrecedence: 255, - ruleQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable" - }, - serviceDataFlowTemplates: [ - { - direction: "Uplink", - ports: [], - remoteIpList: ["10.3.4.0/24"], - templateName: "IP-to-server", - protocol: ["ip"] - } - ], - trafficControl: "Enabled" - } - ], - servicePrecedence: 255, - serviceQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - createService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesDeleteSample.ts deleted file mode 100644 index d88a2200fa0d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - deleteService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesGetSample.ts deleted file mode 100644 index 449dc95ceebb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified service. - * - * @summary Gets information about the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.get( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - getService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesListByMobileNetworkSample.ts deleted file mode 100644 index 062b74b905cf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the services in a mobile network. - * - * @summary Gets all the services in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.services.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listServicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesUpdateTagsSample.ts deleted file mode 100644 index 602401786129..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.updateTags( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - updateServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsCreateOrUpdateSample.ts deleted file mode 100644 index b29f8da76579..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimGroup, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM group. - * - * @summary Creates or updates a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimGroup = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey" - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": {} - } - }, - location: "eastus", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - createSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsDeleteSample.ts deleted file mode 100644 index 5974e50c1dda..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM group. - * - * @summary Deletes the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginDeleteAndWait( - resourceGroupName, - simGroupName - ); - console.log(result); -} - -async function main() { - deleteSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsGetSample.ts deleted file mode 100644 index 7a9321529546..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM group. - * - * @summary Gets information about the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.get(resourceGroupName, simGroupName); - console.log(result); -} - -async function main() { - getSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListByResourceGroupSample.ts deleted file mode 100644 index fcb77b783ce7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a resource group. - * - * @summary Gets all the SIM groups in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListBySubscriptionSample.ts deleted file mode 100644 index c07ede93010e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a subscription. - * - * @summary Gets all the SIM groups in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsUpdateTagsSample.ts deleted file mode 100644 index 41f82587eef1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.updateTags( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b31d5132bded..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimPolicy, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters: SimPolicy = { - defaultSlice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - location: "eastus", - registrationTimer: 3240, - sliceConfigurations: [ - { - dataNetworkConfigurations: [ - { - fiveQi: 9, - additionalAllowedSessionTypes: [], - allocationAndRetentionPriorityLevel: 9, - allowedServices: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService" - } - ], - dataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork" - }, - defaultSessionType: "IPv4", - maximumNumberOfBufferedPackets: 200, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - sessionAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" } - } - ], - defaultDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - } - } - ], - ueAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - createSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesDeleteSample.ts deleted file mode 100644 index 3623dc896150..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM policy. - * - * @summary Deletes the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - deleteSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesGetSample.ts deleted file mode 100644 index 8888aca9e9bf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM policy. - * - * @summary Gets information about the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.get( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - getSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesListByMobileNetworkSample.ts deleted file mode 100644 index d6a3b11cc289..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM policies in a mobile network. - * - * @summary Gets all the SIM policies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simPolicies.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimPoliciesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesUpdateTagsSample.ts deleted file mode 100644 index 59f5c0deaa28..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.updateTags( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkDeleteSample.ts deleted file mode 100644 index 420dbdff1c1e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimDeleteList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk delete SIMs from a SIM group. - * - * @summary Bulk delete SIMs from a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json - */ -async function bulkDeleteSiMSFromASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const parameters: SimDeleteList = { sims: ["testSim", "testSim2"] }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadEncryptedSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadEncryptedSample.ts deleted file mode 100644 index e531847b83b1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadEncryptedSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - EncryptedSimUploadList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @summary Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json - */ -async function bulkUploadEncryptedSiMSToASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: EncryptedSimUploadList = { - azureKeyIdentifier: 1, - encryptedTransportKey: "ABC123", - signedTransportKey: "ABC123", - sims: [ - { - name: "testSim", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }, - { - name: "testSim2", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.2" } - } - ] - } - ], - vendorKeyFingerprint: "ABC123", - version: 1 - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadSample.ts deleted file mode 100644 index 360007383c52..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimUploadList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk upload SIMs to a SIM group. - * - * @summary Bulk upload SIMs to a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json - */ -async function bulkUploadSiMSInASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimUploadList = { - sims: [ - { - name: "testSim", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }, - { - name: "testSim2", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.2" } - } - ] - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsCreateOrUpdateSample.ts deleted file mode 100644 index c89f9eb7af9e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsCreateOrUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Sim, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM. - * - * @summary Creates or updates a SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const parameters: Sim = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - simName, - parameters - ); - console.log(result); -} - -async function main() { - createSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsDeleteSample.ts deleted file mode 100644 index 7594ebc087c3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait( - resourceGroupName, - simGroupName, - simName - ); - console.log(result); -} - -async function main() { - deleteSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsGetSample.ts deleted file mode 100644 index b9a1c49588aa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM. - * - * @summary Gets information about the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get( - resourceGroupName, - simGroupName, - simName - ); - console.log(result); -} - -async function main() { - getSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByGroupSample.ts deleted file mode 100644 index cf9dfb280889..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIMs in a SIM group. - * - * @summary Gets all the SIMs in a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listByGroup( - resourceGroupName, - simGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesCreateOrUpdateSample.ts deleted file mode 100644 index b179193e3e4f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Site, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: Site = { location: "testLocation" }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesDeleteSample.ts deleted file mode 100644 index 7dfa11437e35..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * - * @summary Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - deleteMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesGetSample.ts deleted file mode 100644 index ec161f781273..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network site. - * - * @summary Gets information about the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.get( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - getMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesListByMobileNetworkSample.ts deleted file mode 100644 index 76a412869c34..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all sites in the mobile network. - * - * @summary Lists all sites in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sites.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworkSitesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesUpdateTagsSample.ts deleted file mode 100644 index 744a383a9965..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.updateTags( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkSiteTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesCreateOrUpdateSample.ts deleted file mode 100644 index fd31b3910902..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Slice, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters: Slice = { - description: "myFavouriteSlice", - location: "eastus", - snssai: { sd: "1abcde", sst: 1 } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - createNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesDeleteSample.ts deleted file mode 100644 index 1449d3596972..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified network slice. - * - * @summary Deletes the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - deleteNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesGetSample.ts deleted file mode 100644 index 28f4267ea223..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified network slice. - * - * @summary Gets information about the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.get( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - getNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesListByMobileNetworkSample.ts deleted file mode 100644 index 78adb935b053..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all slices in the mobile network. - * - * @summary Lists all slices in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.slices.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listNetworkSlicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesUpdateTagsSample.ts deleted file mode 100644 index d0970a3bb8a5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.updateTags( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - updateNetworkSliceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/README.md b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/README.md deleted file mode 100644 index 7970ce0897fd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/README.md +++ /dev/null @@ -1,180 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [attachedDataNetworksCreateOrUpdateSample.js][attacheddatanetworkscreateorupdatesample] | Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json | -| [attachedDataNetworksDeleteSample.js][attacheddatanetworksdeletesample] | Deletes the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json | -| [attachedDataNetworksGetSample.js][attacheddatanetworksgetsample] | Gets information about the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json | -| [attachedDataNetworksListByPacketCoreDataPlaneSample.js][attacheddatanetworkslistbypacketcoredataplanesample] | Gets all the attached data networks associated with a packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json | -| [attachedDataNetworksUpdateTagsSample.js][attacheddatanetworksupdatetagssample] | Updates an attached data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json | -| [dataNetworksCreateOrUpdateSample.js][datanetworkscreateorupdatesample] | Creates or updates a data network. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json | -| [dataNetworksDeleteSample.js][datanetworksdeletesample] | Deletes the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json | -| [dataNetworksGetSample.js][datanetworksgetsample] | Gets information about the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json | -| [dataNetworksListByMobileNetworkSample.js][datanetworkslistbymobilenetworksample] | Lists all data networks in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json | -| [dataNetworksUpdateTagsSample.js][datanetworksupdatetagssample] | Updates data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json | -| [mobileNetworksCreateOrUpdateSample.js][mobilenetworkscreateorupdatesample] | Creates or updates a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json | -| [mobileNetworksDeleteSample.js][mobilenetworksdeletesample] | Deletes the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json | -| [mobileNetworksGetSample.js][mobilenetworksgetsample] | Gets information about the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json | -| [mobileNetworksListByResourceGroupSample.js][mobilenetworkslistbyresourcegroupsample] | Lists all the mobile networks in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json | -| [mobileNetworksListBySubscriptionSample.js][mobilenetworkslistbysubscriptionsample] | Lists all the mobile networks in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json | -| [mobileNetworksUpdateTagsSample.js][mobilenetworksupdatetagssample] | Updates mobile network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json | -| [operationsListSample.js][operationslistsample] | Gets a list of the operations. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json | -| [packetCoreControlPlaneVersionsGetSample.js][packetcorecontrolplaneversionsgetsample] | Gets information about the specified packet core control plane version. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json | -| [packetCoreControlPlaneVersionsListSample.js][packetcorecontrolplaneversionslistsample] | Lists all supported packet core control planes versions. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json | -| [packetCoreControlPlanesCollectDiagnosticsPackageSample.js][packetcorecontrolplanescollectdiagnosticspackagesample] | Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json | -| [packetCoreControlPlanesCreateOrUpdateSample.js][packetcorecontrolplanescreateorupdatesample] | Creates or updates a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json | -| [packetCoreControlPlanesDeleteSample.js][packetcorecontrolplanesdeletesample] | Deletes the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json | -| [packetCoreControlPlanesGetSample.js][packetcorecontrolplanesgetsample] | Gets information about the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json | -| [packetCoreControlPlanesListByResourceGroupSample.js][packetcorecontrolplaneslistbyresourcegroupsample] | Lists all the packet core control planes in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json | -| [packetCoreControlPlanesListBySubscriptionSample.js][packetcorecontrolplaneslistbysubscriptionsample] | Lists all the packet core control planes in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json | -| [packetCoreControlPlanesReinstallSample.js][packetcorecontrolplanesreinstallsample] | Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json | -| [packetCoreControlPlanesRollbackSample.js][packetcorecontrolplanesrollbacksample] | Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json | -| [packetCoreControlPlanesUpdateTagsSample.js][packetcorecontrolplanesupdatetagssample] | Updates packet core control planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json | -| [packetCoreDataPlanesCreateOrUpdateSample.js][packetcoredataplanescreateorupdatesample] | Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json | -| [packetCoreDataPlanesDeleteSample.js][packetcoredataplanesdeletesample] | Deletes the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json | -| [packetCoreDataPlanesGetSample.js][packetcoredataplanesgetsample] | Gets information about the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json | -| [packetCoreDataPlanesListByPacketCoreControlPlaneSample.js][packetcoredataplaneslistbypacketcorecontrolplanesample] | Lists all the packet core data planes associated with a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json | -| [packetCoreDataPlanesUpdateTagsSample.js][packetcoredataplanesupdatetagssample] | Updates packet core data planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json | -| [servicesCreateOrUpdateSample.js][servicescreateorupdatesample] | Creates or updates a service. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json | -| [servicesDeleteSample.js][servicesdeletesample] | Deletes the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json | -| [servicesGetSample.js][servicesgetsample] | Gets information about the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json | -| [servicesListByMobileNetworkSample.js][serviceslistbymobilenetworksample] | Gets all the services in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json | -| [servicesUpdateTagsSample.js][servicesupdatetagssample] | Updates service tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json | -| [simGroupsCreateOrUpdateSample.js][simgroupscreateorupdatesample] | Creates or updates a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json | -| [simGroupsDeleteSample.js][simgroupsdeletesample] | Deletes the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json | -| [simGroupsGetSample.js][simgroupsgetsample] | Gets information about the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json | -| [simGroupsListByResourceGroupSample.js][simgroupslistbyresourcegroupsample] | Gets all the SIM groups in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json | -| [simGroupsListBySubscriptionSample.js][simgroupslistbysubscriptionsample] | Gets all the SIM groups in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json | -| [simGroupsUpdateTagsSample.js][simgroupsupdatetagssample] | Updates SIM group tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json | -| [simPoliciesCreateOrUpdateSample.js][simpoliciescreateorupdatesample] | Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json | -| [simPoliciesDeleteSample.js][simpoliciesdeletesample] | Deletes the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json | -| [simPoliciesGetSample.js][simpoliciesgetsample] | Gets information about the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json | -| [simPoliciesListByMobileNetworkSample.js][simpolicieslistbymobilenetworksample] | Gets all the SIM policies in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json | -| [simPoliciesUpdateTagsSample.js][simpoliciesupdatetagssample] | Updates SIM policy tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json | -| [simsBulkDeleteSample.js][simsbulkdeletesample] | Bulk delete SIMs from a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json | -| [simsBulkUploadEncryptedSample.js][simsbulkuploadencryptedsample] | Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json | -| [simsBulkUploadSample.js][simsbulkuploadsample] | Bulk upload SIMs to a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json | -| [simsCreateOrUpdateSample.js][simscreateorupdatesample] | Creates or updates a SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json | -| [simsDeleteSample.js][simsdeletesample] | Deletes the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json | -| [simsGetSample.js][simsgetsample] | Gets information about the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json | -| [simsListByGroupSample.js][simslistbygroupsample] | Gets all the SIMs in a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json | -| [sitesCreateOrUpdateSample.js][sitescreateorupdatesample] | Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json | -| [sitesDeleteSample.js][sitesdeletesample] | Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json | -| [sitesGetSample.js][sitesgetsample] | Gets information about the specified mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json | -| [sitesListByMobileNetworkSample.js][siteslistbymobilenetworksample] | Lists all sites in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json | -| [sitesUpdateTagsSample.js][sitesupdatetagssample] | Updates site tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json | -| [slicesCreateOrUpdateSample.js][slicescreateorupdatesample] | Creates or updates a network slice. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json | -| [slicesDeleteSample.js][slicesdeletesample] | Deletes the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json | -| [slicesGetSample.js][slicesgetsample] | Gets information about the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json | -| [slicesListByMobileNetworkSample.js][sliceslistbymobilenetworksample] | Lists all slices in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json | -| [slicesUpdateTagsSample.js][slicesupdatetagssample] | Updates slice tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.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 attachedDataNetworksCreateOrUpdateSample.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 MOBILENETWORK_SUBSCRIPTION_ID="" MOBILENETWORK_RESOURCE_GROUP="" node attachedDataNetworksCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[attacheddatanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksCreateOrUpdateSample.js -[attacheddatanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksDeleteSample.js -[attacheddatanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksGetSample.js -[attacheddatanetworkslistbypacketcoredataplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js -[attacheddatanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksUpdateTagsSample.js -[datanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksCreateOrUpdateSample.js -[datanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksDeleteSample.js -[datanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksGetSample.js -[datanetworkslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksListByMobileNetworkSample.js -[datanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksUpdateTagsSample.js -[mobilenetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksCreateOrUpdateSample.js -[mobilenetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksDeleteSample.js -[mobilenetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksGetSample.js -[mobilenetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListByResourceGroupSample.js -[mobilenetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListBySubscriptionSample.js -[mobilenetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksUpdateTagsSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/operationsListSample.js -[packetcorecontrolplaneversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsGetSample.js -[packetcorecontrolplaneversionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsListSample.js -[packetcorecontrolplanescollectdiagnosticspackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCollectDiagnosticsPackageSample.js -[packetcorecontrolplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCreateOrUpdateSample.js -[packetcorecontrolplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesDeleteSample.js -[packetcorecontrolplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesGetSample.js -[packetcorecontrolplaneslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListByResourceGroupSample.js -[packetcorecontrolplaneslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListBySubscriptionSample.js -[packetcorecontrolplanesreinstallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesReinstallSample.js -[packetcorecontrolplanesrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesRollbackSample.js -[packetcorecontrolplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesUpdateTagsSample.js -[packetcoredataplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesCreateOrUpdateSample.js -[packetcoredataplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesDeleteSample.js -[packetcoredataplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesGetSample.js -[packetcoredataplaneslistbypacketcorecontrolplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js -[packetcoredataplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesUpdateTagsSample.js -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesCreateOrUpdateSample.js -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesDeleteSample.js -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesGetSample.js -[serviceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesListByMobileNetworkSample.js -[servicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesUpdateTagsSample.js -[simgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsCreateOrUpdateSample.js -[simgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsDeleteSample.js -[simgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsGetSample.js -[simgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListByResourceGroupSample.js -[simgroupslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListBySubscriptionSample.js -[simgroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsUpdateTagsSample.js -[simpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesCreateOrUpdateSample.js -[simpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesDeleteSample.js -[simpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesGetSample.js -[simpolicieslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesListByMobileNetworkSample.js -[simpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesUpdateTagsSample.js -[simsbulkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkDeleteSample.js -[simsbulkuploadencryptedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadEncryptedSample.js -[simsbulkuploadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadSample.js -[simscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsCreateOrUpdateSample.js -[simsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsDeleteSample.js -[simsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsGetSample.js -[simslistbygroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsListByGroupSample.js -[sitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesCreateOrUpdateSample.js -[sitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesDeleteSample.js -[sitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesGetSample.js -[siteslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesListByMobileNetworkSample.js -[sitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesUpdateTagsSample.js -[slicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesCreateOrUpdateSample.js -[slicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesDeleteSample.js -[slicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesGetSample.js -[sliceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesListByMobileNetworkSample.js -[slicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesUpdateTagsSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork/README.md diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksCreateOrUpdateSample.js deleted file mode 100644 index 5c6baf742af0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * - * @summary Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters = { - dnsAddresses: ["1.1.1.1"], - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 30, tcp: 180, udp: 30 }, - portRange: { maxPort: 49999, minPort: 1024 }, - portReuseHoldTime: { tcp: 120, udp: 60 }, - }, - userEquipmentAddressPoolPrefix: ["2.2.0.0/16"], - userEquipmentStaticAddressPoolPrefix: ["2.4.0.0/16"], - userPlaneDataInterface: { name: "N6" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksDeleteSample.js deleted file mode 100644 index 4fa14dfb5903..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksDeleteSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified attached data network. - * - * @summary Deletes the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - deleteAttachedDataNetworkResource(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksGetSample.js deleted file mode 100644 index c25e405e65c1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksGetSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified attached data network. - * - * @summary Gets information about the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - getAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js deleted file mode 100644 index 7ed2b68928a9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the attached data networks associated with a packet core data plane. - * - * @summary Gets all the attached data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.attachedDataNetworks.listByPacketCoreDataPlane( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAttachedDataNetworksInADataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksUpdateTagsSample.js deleted file mode 100644 index db0c8a0cbf86..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksUpdateTagsSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an attached data network tags. - * - * @summary Updates an attached data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateAttachedDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksCreateOrUpdateSample.js deleted file mode 100644 index 3838c7f63f3a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a data network. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a data network. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters = { - description: "myFavouriteDataNetwork", - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksDeleteSample.js deleted file mode 100644 index 83e782be4951..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified data network. - * - * @summary Deletes the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - deleteDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksGetSample.js deleted file mode 100644 index 9f891ba74cc1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksGetSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified data network. - * - * @summary Gets information about the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.get( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - getDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksListByMobileNetworkSample.js deleted file mode 100644 index bd68fd6667ca..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksListByMobileNetworkSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all data networks in the mobile network. - * - * @summary Lists all data networks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataNetworks.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataNetworksInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksUpdateTagsSample.js deleted file mode 100644 index 5a7c0ed1216e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksCreateOrUpdateSample.js deleted file mode 100644 index 65b194a8d8f8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network. - * - * @summary Creates or updates a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters = { - location: "eastus", - publicLandMobileNetworkIdentifier: { mcc: "001", mnc: "01" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksDeleteSample.js deleted file mode 100644 index e055bdd47b5e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network. - * - * @summary Deletes the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - deleteMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksGetSample.js deleted file mode 100644 index f2bf80ac8e0d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network. - * - * @summary Gets information about the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.get(resourceGroupName, mobileNetworkName); - console.log(result); -} - -async function main() { - getMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListByResourceGroupSample.js deleted file mode 100644 index 675f5c83a76b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListByResourceGroupSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a resource group. - * - * @summary Lists all the mobile networks in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListBySubscriptionSample.js deleted file mode 100644 index 25b34e8be0eb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListBySubscriptionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a subscription. - * - * @summary Lists all the mobile networks in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksUpdateTagsSample.js deleted file mode 100644 index 8cd4ff6e11f6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksUpdateTagsSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/operationsListSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/operationsListSample.js deleted file mode 100644 index 9b210d381733..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a list of the operations. - * - * @summary Gets a list of the operations. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getRegistrationOperations(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/package.json deleted file mode 100644 index b221a595c7d9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-mobilenetwork-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/mobilenetwork/arm-mobilenetwork" - }, - "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/mobilenetwork/arm-mobilenetwork", - "dependencies": { - "@azure/arm-mobilenetwork": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsGetSample.js deleted file mode 100644 index 9fe9b159ac29..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane version. - * - * @summary Gets information about the specified packet core control plane version. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const versionName = "PMN-4-11-1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlaneVersions.get(versionName); - console.log(result); -} - -async function main() { - getPacketCoreControlPlaneVersion(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsListSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsListSample.js deleted file mode 100644 index 87c07bdd5692..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all supported packet core control planes versions. - * - * @summary Lists all supported packet core control planes versions. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlaneVersions.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getSupportedPacketCoreControlPlaneVersions(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCollectDiagnosticsPackageSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCollectDiagnosticsPackageSample.js deleted file mode 100644 index 1d42fef805b6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCollectDiagnosticsPackageSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * - * @summary Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json - */ -async function collectDiagnosticsPackageFromPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters = { - storageAccountBlobUrl: - "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip", - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCreateOrUpdateSample.js deleted file mode 100644 index a069cfbee225..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCreateOrUpdateSample.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a packet core control plane. - * - * @summary Creates or updates a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - authenticationType: "AAD", - httpsServerCertificate: { - certificateUrl: "https://contosovault.vault.azure.net/certificates/ingress", - }, - }, - location: "eastus", - platform: { - type: "AKS-HCI", - azureStackEdgeDevice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice", - }, - connectedCluster: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster", - }, - customLocation: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation", - }, - }, - sites: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite", - }, - ], - sku: "G0", - ueMtu: 1600, - version: "0.2.0", - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesDeleteSample.js deleted file mode 100644 index c16c159dfd4e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified packet core control plane. - * - * @summary Deletes the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesGetSample.js deleted file mode 100644 index 9a78d681c849..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane. - * - * @summary Gets information about the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.get( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListByResourceGroupSample.js deleted file mode 100644 index 1222e962443f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListByResourceGroupSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a resource group. - * - * @summary Lists all the packet core control planes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListBySubscriptionSample.js deleted file mode 100644 index 9b8c03ac6fdf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListBySubscriptionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a subscription. - * - * @summary Lists all the packet core control planes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesReinstallSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesReinstallSample.js deleted file mode 100644 index f185143b8c6e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesReinstallSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * - * @summary Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json - */ -async function reinstallPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesRollbackSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesRollbackSample.js deleted file mode 100644 index daa9cd2af594..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesRollbackSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * - * @summary Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json - */ -async function rollbackPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesUpdateTagsSample.js deleted file mode 100644 index 5c9fdc0fa743..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesUpdateTagsSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates packet core control planes tags. - * - * @summary Updates packet core control planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreControlPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesCreateOrUpdateSample.js deleted file mode 100644 index 4cb0d26b9b96..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * - * @summary Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters = { - location: "eastus", - userPlaneAccessInterface: { name: "N3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesDeleteSample.js deleted file mode 100644 index 65180b09db86..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified packet core data plane. - * - * @summary Deletes the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesGetSample.js deleted file mode 100644 index f3f13e209849..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesGetSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core data plane. - * - * @summary Gets information about the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js deleted file mode 100644 index 8f00484cd85f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the packet core data planes associated with a packet core control plane. - * - * @summary Lists all the packet core data planes associated with a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreDataPlanes.listByPacketCoreControlPlane( - resourceGroupName, - packetCoreControlPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreDataPlanesInAControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesUpdateTagsSample.js deleted file mode 100644 index 4fcbc0cd6ba6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates packet core data planes tags. - * - * @summary Updates packet core data planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreDataPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# 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/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesCreateOrUpdateSample.js deleted file mode 100644 index 493fcbff5100..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesCreateOrUpdateSample.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a service. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a service. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters = { - location: "eastus", - pccRules: [ - { - ruleName: "default-rule", - rulePrecedence: 255, - ruleQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - }, - serviceDataFlowTemplates: [ - { - direction: "Uplink", - ports: [], - remoteIpList: ["10.3.4.0/24"], - templateName: "IP-to-server", - protocol: ["ip"], - }, - ], - trafficControl: "Enabled", - }, - ], - servicePrecedence: 255, - serviceQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - createService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesDeleteSample.js deleted file mode 100644 index 8ee76e2ac9d3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - deleteService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesGetSample.js deleted file mode 100644 index 44029429ee7d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified service. - * - * @summary Gets information about the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.get(resourceGroupName, mobileNetworkName, serviceName); - console.log(result); -} - -async function main() { - getService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesListByMobileNetworkSample.js deleted file mode 100644 index b696c9b8d3da..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesListByMobileNetworkSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the services in a mobile network. - * - * @summary Gets all the services in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.services.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listServicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesUpdateTagsSample.js deleted file mode 100644 index 48fabe896633..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.updateTags( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - updateServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsCreateOrUpdateSample.js deleted file mode 100644 index 39b158bd1513..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a SIM group. - * - * @summary Creates or updates a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": - {}, - }, - }, - location: "eastus", - mobileNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - createSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsDeleteSample.js deleted file mode 100644 index 62d2675612cb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified SIM group. - * - * @summary Deletes the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginDeleteAndWait(resourceGroupName, simGroupName); - console.log(result); -} - -async function main() { - deleteSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsGetSample.js deleted file mode 100644 index b8959fa8b952..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM group. - * - * @summary Gets information about the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.get(resourceGroupName, simGroupName); - console.log(result); -} - -async function main() { - getSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListByResourceGroupSample.js deleted file mode 100644 index 43b025340716..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListByResourceGroupSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a resource group. - * - * @summary Gets all the SIM groups in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListBySubscriptionSample.js deleted file mode 100644 index cf0f521eee9d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListBySubscriptionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a subscription. - * - * @summary Gets all the SIM groups in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsUpdateTagsSample.js deleted file mode 100644 index 13ee992e77e4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsUpdateTagsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.updateTags(resourceGroupName, simGroupName, parameters); - console.log(result); -} - -async function main() { - updateSimGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 63acb08870e3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters = { - defaultSlice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - location: "eastus", - registrationTimer: 3240, - sliceConfigurations: [ - { - dataNetworkConfigurations: [ - { - fiveQi: 9, - additionalAllowedSessionTypes: [], - allocationAndRetentionPriorityLevel: 9, - allowedServices: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService", - }, - ], - dataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork", - }, - defaultSessionType: "IPv4", - maximumNumberOfBufferedPackets: 200, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - sessionAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" }, - }, - ], - defaultDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - }, - ], - ueAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - createSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesDeleteSample.js deleted file mode 100644 index 67c26fcae9b3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified SIM policy. - * - * @summary Deletes the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - deleteSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesGetSample.js deleted file mode 100644 index de4390217047..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM policy. - * - * @summary Gets information about the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.get(resourceGroupName, mobileNetworkName, simPolicyName); - console.log(result); -} - -async function main() { - getSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesListByMobileNetworkSample.js deleted file mode 100644 index f6816ca50f69..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesListByMobileNetworkSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the SIM policies in a mobile network. - * - * @summary Gets all the SIM policies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simPolicies.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimPoliciesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesUpdateTagsSample.js deleted file mode 100644 index 5f52f825e11c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.updateTags( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkDeleteSample.js deleted file mode 100644 index d2e319e04077..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Bulk delete SIMs from a SIM group. - * - * @summary Bulk delete SIMs from a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json - */ -async function bulkDeleteSiMSFromASimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const parameters = { sims: ["testSim", "testSim2"] }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadEncryptedSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadEncryptedSample.js deleted file mode 100644 index 1fa75697b6c1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadEncryptedSample.js +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @summary Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json - */ -async function bulkUploadEncryptedSiMSToASimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { - azureKeyIdentifier: 1, - encryptedTransportKey: "ABC123", - signedTransportKey: "ABC123", - sims: [ - { - name: "testSim", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.1" }, - }, - ], - }, - { - name: "testSim2", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.2" }, - }, - ], - }, - ], - vendorKeyFingerprint: "ABC123", - version: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadSample.js deleted file mode 100644 index 8ff0df6ea55c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadSample.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Bulk upload SIMs to a SIM group. - * - * @summary Bulk upload SIMs to a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json - */ -async function bulkUploadSiMSInASimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { - sims: [ - { - name: "testSim", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.1" }, - }, - ], - }, - { - name: "testSim2", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.2" }, - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsCreateOrUpdateSample.js deleted file mode 100644 index 33c26594009f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsCreateOrUpdateSample.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a SIM. - * - * @summary Creates or updates a SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const parameters = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.1" }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - simName, - parameters - ); - console.log(result); -} - -async function main() { - createSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsDeleteSample.js deleted file mode 100644 index 3ee07847cdf6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait(resourceGroupName, simGroupName, simName); - console.log(result); -} - -async function main() { - deleteSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsGetSample.js deleted file mode 100644 index 64f9dbfd1cbb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM. - * - * @summary Gets information about the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get(resourceGroupName, simGroupName, simName); - console.log(result); -} - -async function main() { - getSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsListByGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsListByGroupSample.js deleted file mode 100644 index bd46ee89bb4a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsListByGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the SIMs in a SIM group. - * - * @summary Gets all the SIMs in a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listByGroup(resourceGroupName, simGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesCreateOrUpdateSample.js deleted file mode 100644 index 3431a47df3f5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters = { location: "testLocation" }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesDeleteSample.js deleted file mode 100644 index 961e267ee931..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * - * @summary Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - deleteMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesGetSample.js deleted file mode 100644 index 265ec610c26e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network site. - * - * @summary Gets information about the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.get(resourceGroupName, mobileNetworkName, siteName); - console.log(result); -} - -async function main() { - getMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesListByMobileNetworkSample.js deleted file mode 100644 index af1a56267d19..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesListByMobileNetworkSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all sites in the mobile network. - * - * @summary Lists all sites in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sites.listByMobileNetwork(resourceGroupName, mobileNetworkName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworkSitesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesUpdateTagsSample.js deleted file mode 100644 index 040d6d57fd44..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.updateTags( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkSiteTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesCreateOrUpdateSample.js deleted file mode 100644 index 191e4c0da218..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters = { - description: "myFavouriteSlice", - location: "eastus", - snssai: { sd: "1abcde", sst: 1 }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - createNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesDeleteSample.js deleted file mode 100644 index 795c8b192469..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified network slice. - * - * @summary Deletes the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - deleteNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesGetSample.js deleted file mode 100644 index f77ee0471014..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified network slice. - * - * @summary Gets information about the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.get(resourceGroupName, mobileNetworkName, sliceName); - console.log(result); -} - -async function main() { - getNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesListByMobileNetworkSample.js deleted file mode 100644 index 3445fc7496af..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesListByMobileNetworkSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all slices in the mobile network. - * - * @summary Lists all slices in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.slices.listByMobileNetwork(resourceGroupName, mobileNetworkName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listNetworkSlicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesUpdateTagsSample.js deleted file mode 100644 index 6bb334d73838..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.updateTags( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - updateNetworkSliceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/README.md b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/README.md deleted file mode 100644 index f5e2d43e00bf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [attachedDataNetworksCreateOrUpdateSample.ts][attacheddatanetworkscreateorupdatesample] | Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json | -| [attachedDataNetworksDeleteSample.ts][attacheddatanetworksdeletesample] | Deletes the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json | -| [attachedDataNetworksGetSample.ts][attacheddatanetworksgetsample] | Gets information about the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json | -| [attachedDataNetworksListByPacketCoreDataPlaneSample.ts][attacheddatanetworkslistbypacketcoredataplanesample] | Gets all the attached data networks associated with a packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json | -| [attachedDataNetworksUpdateTagsSample.ts][attacheddatanetworksupdatetagssample] | Updates an attached data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json | -| [dataNetworksCreateOrUpdateSample.ts][datanetworkscreateorupdatesample] | Creates or updates a data network. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json | -| [dataNetworksDeleteSample.ts][datanetworksdeletesample] | Deletes the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json | -| [dataNetworksGetSample.ts][datanetworksgetsample] | Gets information about the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json | -| [dataNetworksListByMobileNetworkSample.ts][datanetworkslistbymobilenetworksample] | Lists all data networks in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json | -| [dataNetworksUpdateTagsSample.ts][datanetworksupdatetagssample] | Updates data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json | -| [mobileNetworksCreateOrUpdateSample.ts][mobilenetworkscreateorupdatesample] | Creates or updates a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json | -| [mobileNetworksDeleteSample.ts][mobilenetworksdeletesample] | Deletes the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json | -| [mobileNetworksGetSample.ts][mobilenetworksgetsample] | Gets information about the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json | -| [mobileNetworksListByResourceGroupSample.ts][mobilenetworkslistbyresourcegroupsample] | Lists all the mobile networks in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json | -| [mobileNetworksListBySubscriptionSample.ts][mobilenetworkslistbysubscriptionsample] | Lists all the mobile networks in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json | -| [mobileNetworksUpdateTagsSample.ts][mobilenetworksupdatetagssample] | Updates mobile network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json | -| [operationsListSample.ts][operationslistsample] | Gets a list of the operations. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json | -| [packetCoreControlPlaneVersionsGetSample.ts][packetcorecontrolplaneversionsgetsample] | Gets information about the specified packet core control plane version. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json | -| [packetCoreControlPlaneVersionsListSample.ts][packetcorecontrolplaneversionslistsample] | Lists all supported packet core control planes versions. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json | -| [packetCoreControlPlanesCollectDiagnosticsPackageSample.ts][packetcorecontrolplanescollectdiagnosticspackagesample] | Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json | -| [packetCoreControlPlanesCreateOrUpdateSample.ts][packetcorecontrolplanescreateorupdatesample] | Creates or updates a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json | -| [packetCoreControlPlanesDeleteSample.ts][packetcorecontrolplanesdeletesample] | Deletes the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json | -| [packetCoreControlPlanesGetSample.ts][packetcorecontrolplanesgetsample] | Gets information about the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json | -| [packetCoreControlPlanesListByResourceGroupSample.ts][packetcorecontrolplaneslistbyresourcegroupsample] | Lists all the packet core control planes in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json | -| [packetCoreControlPlanesListBySubscriptionSample.ts][packetcorecontrolplaneslistbysubscriptionsample] | Lists all the packet core control planes in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json | -| [packetCoreControlPlanesReinstallSample.ts][packetcorecontrolplanesreinstallsample] | Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json | -| [packetCoreControlPlanesRollbackSample.ts][packetcorecontrolplanesrollbacksample] | Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json | -| [packetCoreControlPlanesUpdateTagsSample.ts][packetcorecontrolplanesupdatetagssample] | Updates packet core control planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json | -| [packetCoreDataPlanesCreateOrUpdateSample.ts][packetcoredataplanescreateorupdatesample] | Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json | -| [packetCoreDataPlanesDeleteSample.ts][packetcoredataplanesdeletesample] | Deletes the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json | -| [packetCoreDataPlanesGetSample.ts][packetcoredataplanesgetsample] | Gets information about the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json | -| [packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts][packetcoredataplaneslistbypacketcorecontrolplanesample] | Lists all the packet core data planes associated with a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json | -| [packetCoreDataPlanesUpdateTagsSample.ts][packetcoredataplanesupdatetagssample] | Updates packet core data planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json | -| [servicesCreateOrUpdateSample.ts][servicescreateorupdatesample] | Creates or updates a service. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json | -| [servicesDeleteSample.ts][servicesdeletesample] | Deletes the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json | -| [servicesGetSample.ts][servicesgetsample] | Gets information about the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json | -| [servicesListByMobileNetworkSample.ts][serviceslistbymobilenetworksample] | Gets all the services in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json | -| [servicesUpdateTagsSample.ts][servicesupdatetagssample] | Updates service tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json | -| [simGroupsCreateOrUpdateSample.ts][simgroupscreateorupdatesample] | Creates or updates a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json | -| [simGroupsDeleteSample.ts][simgroupsdeletesample] | Deletes the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json | -| [simGroupsGetSample.ts][simgroupsgetsample] | Gets information about the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json | -| [simGroupsListByResourceGroupSample.ts][simgroupslistbyresourcegroupsample] | Gets all the SIM groups in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json | -| [simGroupsListBySubscriptionSample.ts][simgroupslistbysubscriptionsample] | Gets all the SIM groups in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json | -| [simGroupsUpdateTagsSample.ts][simgroupsupdatetagssample] | Updates SIM group tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json | -| [simPoliciesCreateOrUpdateSample.ts][simpoliciescreateorupdatesample] | Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json | -| [simPoliciesDeleteSample.ts][simpoliciesdeletesample] | Deletes the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json | -| [simPoliciesGetSample.ts][simpoliciesgetsample] | Gets information about the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json | -| [simPoliciesListByMobileNetworkSample.ts][simpolicieslistbymobilenetworksample] | Gets all the SIM policies in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json | -| [simPoliciesUpdateTagsSample.ts][simpoliciesupdatetagssample] | Updates SIM policy tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json | -| [simsBulkDeleteSample.ts][simsbulkdeletesample] | Bulk delete SIMs from a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json | -| [simsBulkUploadEncryptedSample.ts][simsbulkuploadencryptedsample] | Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json | -| [simsBulkUploadSample.ts][simsbulkuploadsample] | Bulk upload SIMs to a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json | -| [simsCreateOrUpdateSample.ts][simscreateorupdatesample] | Creates or updates a SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json | -| [simsDeleteSample.ts][simsdeletesample] | Deletes the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json | -| [simsGetSample.ts][simsgetsample] | Gets information about the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json | -| [simsListByGroupSample.ts][simslistbygroupsample] | Gets all the SIMs in a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json | -| [sitesCreateOrUpdateSample.ts][sitescreateorupdatesample] | Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json | -| [sitesDeleteSample.ts][sitesdeletesample] | Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json | -| [sitesGetSample.ts][sitesgetsample] | Gets information about the specified mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json | -| [sitesListByMobileNetworkSample.ts][siteslistbymobilenetworksample] | Lists all sites in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json | -| [sitesUpdateTagsSample.ts][sitesupdatetagssample] | Updates site tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json | -| [slicesCreateOrUpdateSample.ts][slicescreateorupdatesample] | Creates or updates a network slice. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json | -| [slicesDeleteSample.ts][slicesdeletesample] | Deletes the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json | -| [slicesGetSample.ts][slicesgetsample] | Gets information about the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json | -| [slicesListByMobileNetworkSample.ts][sliceslistbymobilenetworksample] | Lists all slices in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json | -| [slicesUpdateTagsSample.ts][slicesupdatetagssample] | Updates slice tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.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/attachedDataNetworksCreateOrUpdateSample.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 MOBILENETWORK_SUBSCRIPTION_ID="" MOBILENETWORK_RESOURCE_GROUP="" node dist/attachedDataNetworksCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[attacheddatanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts -[attacheddatanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksDeleteSample.ts -[attacheddatanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksGetSample.ts -[attacheddatanetworkslistbypacketcoredataplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts -[attacheddatanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksUpdateTagsSample.ts -[datanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksCreateOrUpdateSample.ts -[datanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksDeleteSample.ts -[datanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksGetSample.ts -[datanetworkslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksListByMobileNetworkSample.ts -[datanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksUpdateTagsSample.ts -[mobilenetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksCreateOrUpdateSample.ts -[mobilenetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksDeleteSample.ts -[mobilenetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksGetSample.ts -[mobilenetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListByResourceGroupSample.ts -[mobilenetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListBySubscriptionSample.ts -[mobilenetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksUpdateTagsSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/operationsListSample.ts -[packetcorecontrolplaneversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsGetSample.ts -[packetcorecontrolplaneversionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsListSample.ts -[packetcorecontrolplanescollectdiagnosticspackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts -[packetcorecontrolplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts -[packetcorecontrolplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesDeleteSample.ts -[packetcorecontrolplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesGetSample.ts -[packetcorecontrolplaneslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts -[packetcorecontrolplaneslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts -[packetcorecontrolplanesreinstallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesReinstallSample.ts -[packetcorecontrolplanesrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesRollbackSample.ts -[packetcorecontrolplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts -[packetcoredataplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts -[packetcoredataplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesDeleteSample.ts -[packetcoredataplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesGetSample.ts -[packetcoredataplaneslistbypacketcorecontrolplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts -[packetcoredataplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesCreateOrUpdateSample.ts -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesDeleteSample.ts -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesGetSample.ts -[serviceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesListByMobileNetworkSample.ts -[servicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesUpdateTagsSample.ts -[simgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsCreateOrUpdateSample.ts -[simgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsDeleteSample.ts -[simgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsGetSample.ts -[simgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListByResourceGroupSample.ts -[simgroupslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListBySubscriptionSample.ts -[simgroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsUpdateTagsSample.ts -[simpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesCreateOrUpdateSample.ts -[simpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesDeleteSample.ts -[simpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesGetSample.ts -[simpolicieslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesListByMobileNetworkSample.ts -[simpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesUpdateTagsSample.ts -[simsbulkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkDeleteSample.ts -[simsbulkuploadencryptedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadEncryptedSample.ts -[simsbulkuploadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadSample.ts -[simscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsCreateOrUpdateSample.ts -[simsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsDeleteSample.ts -[simsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsGetSample.ts -[simslistbygroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsListByGroupSample.ts -[sitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesCreateOrUpdateSample.ts -[sitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesDeleteSample.ts -[sitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesGetSample.ts -[siteslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesListByMobileNetworkSample.ts -[sitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesUpdateTagsSample.ts -[slicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesCreateOrUpdateSample.ts -[slicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesDeleteSample.ts -[slicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesGetSample.ts -[sliceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesListByMobileNetworkSample.ts -[slicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesUpdateTagsSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/package.json deleted file mode 100644 index 9755f88f7427..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-mobilenetwork-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "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/mobilenetwork/arm-mobilenetwork" - }, - "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/mobilenetwork/arm-mobilenetwork", - "dependencies": { - "@azure/arm-mobilenetwork": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~4.8.0", - "rimraf": "latest" - } -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# 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/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 791c63bdec48..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AttachedDataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * - * @summary Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters: AttachedDataNetwork = { - dnsAddresses: ["1.1.1.1"], - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 30, tcp: 180, udp: 30 }, - portRange: { maxPort: 49999, minPort: 1024 }, - portReuseHoldTime: { tcp: 120, udp: 60 } - }, - userEquipmentAddressPoolPrefix: ["2.2.0.0/16"], - userEquipmentStaticAddressPoolPrefix: ["2.4.0.0/16"], - userPlaneDataInterface: { name: "N6" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksDeleteSample.ts deleted file mode 100644 index e30cf94458c7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified attached data network. - * - * @summary Deletes the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - deleteAttachedDataNetworkResource(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksGetSample.ts deleted file mode 100644 index b6badff4dcb2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksGetSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified attached data network. - * - * @summary Gets information about the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - getAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts deleted file mode 100644 index 744af2341db7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the attached data networks associated with a packet core data plane. - * - * @summary Gets all the attached data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.attachedDataNetworks.listByPacketCoreDataPlane( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAttachedDataNetworksInADataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksUpdateTagsSample.ts deleted file mode 100644 index e3b12165d513..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an attached data network tags. - * - * @summary Updates an attached data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateAttachedDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 983eb31c63e4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a data network. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a data network. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters: DataNetwork = { - description: "myFavouriteDataNetwork", - location: "eastus" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksDeleteSample.ts deleted file mode 100644 index c37d17fb818b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified data network. - * - * @summary Deletes the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - deleteDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksGetSample.ts deleted file mode 100644 index c305a7fae7b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified data network. - * - * @summary Gets information about the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.get( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - getDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksListByMobileNetworkSample.ts deleted file mode 100644 index f558493bee5d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data networks in the mobile network. - * - * @summary Lists all data networks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataNetworks.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataNetworksInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksUpdateTagsSample.ts deleted file mode 100644 index 4b6edda19847..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 7ba80547b2ae..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MobileNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network. - * - * @summary Creates or updates a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters: MobileNetwork = { - location: "eastus", - publicLandMobileNetworkIdentifier: { mcc: "001", mnc: "01" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksDeleteSample.ts deleted file mode 100644 index 2e35d2a808a2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network. - * - * @summary Deletes the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - deleteMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksGetSample.ts deleted file mode 100644 index f8bb34b1370f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network. - * - * @summary Gets information about the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.get( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - getMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListByResourceGroupSample.ts deleted file mode 100644 index 348fc0ea2d4c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a resource group. - * - * @summary Lists all the mobile networks in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListBySubscriptionSample.ts deleted file mode 100644 index e91d8627cc38..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a subscription. - * - * @summary Lists all the mobile networks in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksUpdateTagsSample.ts deleted file mode 100644 index d86c8fe08f93..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/operationsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/operationsListSample.ts deleted file mode 100644 index 7d825d29dfc5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of the operations. - * - * @summary Gets a list of the operations. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getRegistrationOperations(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsGetSample.ts deleted file mode 100644 index 1ce3132540dc..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane version. - * - * @summary Gets information about the specified packet core control plane version. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const versionName = "PMN-4-11-1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlaneVersions.get(versionName); - console.log(result); -} - -async function main() { - getPacketCoreControlPlaneVersion(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsListSample.ts deleted file mode 100644 index 63dad3ce3740..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all supported packet core control planes versions. - * - * @summary Lists all supported packet core control planes versions. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlaneVersions.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getSupportedPacketCoreControlPlaneVersions(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts deleted file mode 100644 index 8e131575a9d9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlaneCollectDiagnosticsPackage, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * - * @summary Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json - */ -async function collectDiagnosticsPackageFromPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlaneCollectDiagnosticsPackage = { - storageAccountBlobUrl: - "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts deleted file mode 100644 index 94ba54de44c9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a packet core control plane. - * - * @summary Creates or updates a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlane = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - authenticationType: "AAD", - httpsServerCertificate: { - certificateUrl: - "https://contosovault.vault.azure.net/certificates/ingress" - } - }, - location: "eastus", - platform: { - type: "AKS-HCI", - azureStackEdgeDevice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice" - }, - connectedCluster: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster" - }, - customLocation: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation" - } - }, - sites: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite" - } - ], - sku: "G0", - ueMtu: 1600, - version: "0.2.0" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesDeleteSample.ts deleted file mode 100644 index 49f71c97173d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified packet core control plane. - * - * @summary Deletes the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesGetSample.ts deleted file mode 100644 index 3ea686ce575a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane. - * - * @summary Gets information about the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.get( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts deleted file mode 100644 index e90c72ed77b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a resource group. - * - * @summary Lists all the packet core control planes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts deleted file mode 100644 index fb15bca1e86c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a subscription. - * - * @summary Lists all the packet core control planes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesReinstallSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesReinstallSample.ts deleted file mode 100644 index 53c444c08243..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesReinstallSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * - * @summary Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json - */ -async function reinstallPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesRollbackSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesRollbackSample.ts deleted file mode 100644 index e5cc4c226ddd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesRollbackSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * - * @summary Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json - */ -async function rollbackPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts deleted file mode 100644 index f39687caf496..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates packet core control planes tags. - * - * @summary Updates packet core control planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreControlPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts deleted file mode 100644 index edd571d456d6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreDataPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * - * @summary Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters: PacketCoreDataPlane = { - location: "eastus", - userPlaneAccessInterface: { name: "N3" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesDeleteSample.ts deleted file mode 100644 index 2a2549793ced..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified packet core data plane. - * - * @summary Deletes the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesGetSample.ts deleted file mode 100644 index d11c47f32dd7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core data plane. - * - * @summary Gets information about the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts deleted file mode 100644 index 241fc5e80d5a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core data planes associated with a packet core control plane. - * - * @summary Lists all the packet core data planes associated with a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreDataPlanes.listByPacketCoreControlPlane( - resourceGroupName, - packetCoreControlPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreDataPlanesInAControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts deleted file mode 100644 index 0e9f7219fb45..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates packet core data planes tags. - * - * @summary Updates packet core data planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreDataPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesCreateOrUpdateSample.ts deleted file mode 100644 index 2da2d56bdfbd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Service, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a service. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a service. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters: Service = { - location: "eastus", - pccRules: [ - { - ruleName: "default-rule", - rulePrecedence: 255, - ruleQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable" - }, - serviceDataFlowTemplates: [ - { - direction: "Uplink", - ports: [], - remoteIpList: ["10.3.4.0/24"], - templateName: "IP-to-server", - protocol: ["ip"] - } - ], - trafficControl: "Enabled" - } - ], - servicePrecedence: 255, - serviceQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - createService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesDeleteSample.ts deleted file mode 100644 index d88a2200fa0d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - deleteService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesGetSample.ts deleted file mode 100644 index 449dc95ceebb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified service. - * - * @summary Gets information about the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.get( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - getService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesListByMobileNetworkSample.ts deleted file mode 100644 index 062b74b905cf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the services in a mobile network. - * - * @summary Gets all the services in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.services.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listServicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesUpdateTagsSample.ts deleted file mode 100644 index 602401786129..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.updateTags( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - updateServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsCreateOrUpdateSample.ts deleted file mode 100644 index b29f8da76579..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimGroup, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM group. - * - * @summary Creates or updates a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimGroup = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey" - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": {} - } - }, - location: "eastus", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - createSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsDeleteSample.ts deleted file mode 100644 index 5974e50c1dda..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM group. - * - * @summary Deletes the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginDeleteAndWait( - resourceGroupName, - simGroupName - ); - console.log(result); -} - -async function main() { - deleteSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsGetSample.ts deleted file mode 100644 index 7a9321529546..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM group. - * - * @summary Gets information about the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.get(resourceGroupName, simGroupName); - console.log(result); -} - -async function main() { - getSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListByResourceGroupSample.ts deleted file mode 100644 index fcb77b783ce7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a resource group. - * - * @summary Gets all the SIM groups in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListBySubscriptionSample.ts deleted file mode 100644 index c07ede93010e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a subscription. - * - * @summary Gets all the SIM groups in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsUpdateTagsSample.ts deleted file mode 100644 index 41f82587eef1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.updateTags( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b31d5132bded..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimPolicy, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters: SimPolicy = { - defaultSlice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - location: "eastus", - registrationTimer: 3240, - sliceConfigurations: [ - { - dataNetworkConfigurations: [ - { - fiveQi: 9, - additionalAllowedSessionTypes: [], - allocationAndRetentionPriorityLevel: 9, - allowedServices: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService" - } - ], - dataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork" - }, - defaultSessionType: "IPv4", - maximumNumberOfBufferedPackets: 200, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - sessionAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" } - } - ], - defaultDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - } - } - ], - ueAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - createSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesDeleteSample.ts deleted file mode 100644 index 3623dc896150..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM policy. - * - * @summary Deletes the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - deleteSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesGetSample.ts deleted file mode 100644 index 8888aca9e9bf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM policy. - * - * @summary Gets information about the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.get( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - getSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesListByMobileNetworkSample.ts deleted file mode 100644 index d6a3b11cc289..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM policies in a mobile network. - * - * @summary Gets all the SIM policies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simPolicies.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimPoliciesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesUpdateTagsSample.ts deleted file mode 100644 index 59f5c0deaa28..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.updateTags( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkDeleteSample.ts deleted file mode 100644 index 420dbdff1c1e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimDeleteList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk delete SIMs from a SIM group. - * - * @summary Bulk delete SIMs from a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json - */ -async function bulkDeleteSiMSFromASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const parameters: SimDeleteList = { sims: ["testSim", "testSim2"] }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadEncryptedSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadEncryptedSample.ts deleted file mode 100644 index e531847b83b1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadEncryptedSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - EncryptedSimUploadList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @summary Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json - */ -async function bulkUploadEncryptedSiMSToASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: EncryptedSimUploadList = { - azureKeyIdentifier: 1, - encryptedTransportKey: "ABC123", - signedTransportKey: "ABC123", - sims: [ - { - name: "testSim", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }, - { - name: "testSim2", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.2" } - } - ] - } - ], - vendorKeyFingerprint: "ABC123", - version: 1 - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadSample.ts deleted file mode 100644 index 360007383c52..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimUploadList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk upload SIMs to a SIM group. - * - * @summary Bulk upload SIMs to a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json - */ -async function bulkUploadSiMSInASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimUploadList = { - sims: [ - { - name: "testSim", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }, - { - name: "testSim2", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.2" } - } - ] - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsCreateOrUpdateSample.ts deleted file mode 100644 index c89f9eb7af9e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsCreateOrUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Sim, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM. - * - * @summary Creates or updates a SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const parameters: Sim = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - simName, - parameters - ); - console.log(result); -} - -async function main() { - createSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsDeleteSample.ts deleted file mode 100644 index 7594ebc087c3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait( - resourceGroupName, - simGroupName, - simName - ); - console.log(result); -} - -async function main() { - deleteSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsGetSample.ts deleted file mode 100644 index b9a1c49588aa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM. - * - * @summary Gets information about the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get( - resourceGroupName, - simGroupName, - simName - ); - console.log(result); -} - -async function main() { - getSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsListByGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsListByGroupSample.ts deleted file mode 100644 index cf9dfb280889..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsListByGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIMs in a SIM group. - * - * @summary Gets all the SIMs in a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listByGroup( - resourceGroupName, - simGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesCreateOrUpdateSample.ts deleted file mode 100644 index b179193e3e4f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Site, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: Site = { location: "testLocation" }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesDeleteSample.ts deleted file mode 100644 index 7dfa11437e35..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * - * @summary Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - deleteMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesGetSample.ts deleted file mode 100644 index ec161f781273..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network site. - * - * @summary Gets information about the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.get( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - getMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesListByMobileNetworkSample.ts deleted file mode 100644 index 76a412869c34..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all sites in the mobile network. - * - * @summary Lists all sites in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sites.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworkSitesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesUpdateTagsSample.ts deleted file mode 100644 index 744a383a9965..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.updateTags( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkSiteTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesCreateOrUpdateSample.ts deleted file mode 100644 index fd31b3910902..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Slice, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters: Slice = { - description: "myFavouriteSlice", - location: "eastus", - snssai: { sd: "1abcde", sst: 1 } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - createNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesDeleteSample.ts deleted file mode 100644 index 1449d3596972..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified network slice. - * - * @summary Deletes the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - deleteNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesGetSample.ts deleted file mode 100644 index 28f4267ea223..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified network slice. - * - * @summary Gets information about the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.get( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - getNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesListByMobileNetworkSample.ts deleted file mode 100644 index 78adb935b053..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all slices in the mobile network. - * - * @summary Lists all slices in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.slices.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listNetworkSlicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesUpdateTagsSample.ts deleted file mode 100644 index d0970a3bb8a5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.updateTags( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - updateNetworkSliceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/tsconfig.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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/mobilenetwork/arm-mobilenetwork/src/lroImpl.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/lroImpl.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/lroImpl.ts @@ -6,29 +6,37 @@ * 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 class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +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/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts index 546f6c1f6a47..0d71ee95820d 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts @@ -78,7 +78,7 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mobilenetwork/2.0.1`; + const packageDetails = `azsdk-js-arm-mobilenetwork/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts index c28fe5375832..eeddabe26de5 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts @@ -453,7 +453,7 @@ export interface PacketCoreDataPlaneListResult { /** QoS policy */ export interface QosPolicy { - /** QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition of which are the GBR 5QI values. */ + /** 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition the 5QI values. */ fiveQi?: number; /** QoS Flow allocation and retention priority (ARP) level. Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` and `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then `5qi` is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ allocationAndRetentionPriorityLevel?: number; @@ -763,7 +763,7 @@ export interface DataNetworkConfiguration { dataNetwork: DataNetworkResourceId; /** Aggregate maximum bit rate across all non-GBR QoS flows of a given PDU session. See 3GPP TS23.501 section 5.7.2.6 for a full description of the Session-AMBR. */ sessionAmbr: Ambr; - /** Default QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition of which are the GBR 5QI values. */ + /** Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition the 5QI values. */ fiveQi?: number; /** Default QoS Flow allocation and retention priority (ARP) level. Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` and `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then `5qi` is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ allocationAndRetentionPriorityLevel?: number; @@ -1262,16 +1262,12 @@ export type PlatformType = string; /** Known values of {@link BillingSku} that the service accepts. */ export enum KnownBillingSku { - /** 100 Mbps, 20 active SIMs plan */ + /** 100 Mbps, 20 active SIMs plan, 2 RANs */ G0 = "G0", - /** 1 Gbps, 100 active SIMs plan */ + /** 1 Gbps, 100 active SIMs plan, 5 RANs */ G1 = "G1", - /** 2 Gbps, 200 active SIMs plan */ + /** 2 Gbps, 200 active SIMs plan, 10 RANs */ G2 = "G2", - /** 3 Gbps, 300 active SIMs plan */ - G3 = "G3", - /** 4 Gbps, 400 active SIMs plan */ - G4 = "G4", /** 5 Gbps, 500 active SIMs plan */ G5 = "G5", /** 10 Gbps, 1000 active SIMs plan */ @@ -1283,11 +1279,9 @@ export enum KnownBillingSku { * {@link KnownBillingSku} can be used interchangeably with BillingSku, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **G0**: 100 Mbps, 20 active SIMs plan \ - * **G1**: 1 Gbps, 100 active SIMs plan \ - * **G2**: 2 Gbps, 200 active SIMs plan \ - * **G3**: 3 Gbps, 300 active SIMs plan \ - * **G4**: 4 Gbps, 400 active SIMs plan \ + * **G0**: 100 Mbps, 20 active SIMs plan, 2 RANs \ + * **G1**: 1 Gbps, 100 active SIMs plan, 5 RANs \ + * **G2**: 2 Gbps, 200 active SIMs plan, 10 RANs \ * **G5**: 5 Gbps, 500 active SIMs plan \ * **G10**: 10 Gbps, 1000 active SIMs plan */ diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts index 7a69690531f5..60d164021e80 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AttachedDataNetwork, AttachedDataNetworksListByPacketCoreDataPlaneNextOptionalParams, @@ -151,14 +155,14 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -191,21 +195,21 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -281,8 +285,8 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AttachedDataNetworksCreateOrUpdateResponse > > { @@ -292,7 +296,7 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -325,9 +329,9 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, @@ -335,12 +339,15 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + AttachedDataNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts index 84be12443fc6..bb995ff19db8 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DataNetwork, DataNetworksListByMobileNetworkNextOptionalParams, @@ -140,14 +144,14 @@ export class DataNetworksImpl implements DataNetworks { mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -180,15 +184,15 @@ export class DataNetworksImpl implements DataNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, dataNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, dataNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -251,8 +255,8 @@ export class DataNetworksImpl implements DataNetworks { parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataNetworksCreateOrUpdateResponse > > { @@ -262,7 +266,7 @@ export class DataNetworksImpl implements DataNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -295,21 +299,24 @@ export class DataNetworksImpl implements DataNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, dataNetworkName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DataNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts index f366560dd2cf..ae34d06e0b6b 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { MobileNetwork, MobileNetworksListBySubscriptionNextOptionalParams, @@ -181,14 +185,14 @@ export class MobileNetworksImpl implements MobileNetworks { resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,15 +225,15 @@ export class MobileNetworksImpl implements MobileNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -284,8 +288,8 @@ export class MobileNetworksImpl implements MobileNetworks { parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MobileNetworksCreateOrUpdateResponse > > { @@ -295,7 +299,7 @@ export class MobileNetworksImpl implements MobileNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -328,15 +332,18 @@ export class MobileNetworksImpl implements MobileNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + MobileNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts index f056f55d735e..db5ab9aebae1 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PacketCoreControlPlane, PacketCoreControlPlanesListBySubscriptionNextOptionalParams, @@ -188,14 +192,14 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -228,15 +232,15 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -291,8 +295,8 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesCreateOrUpdateResponse > > { @@ -302,7 +306,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -335,15 +339,23 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreControlPlanesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -430,8 +442,8 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesRollbackResponse > > { @@ -441,7 +453,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -474,15 +486,18 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, options }, - rollbackOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, options }, + spec: rollbackOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreControlPlanesRollbackResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -520,8 +535,8 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesReinstallResponse > > { @@ -531,7 +546,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -564,15 +579,18 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, options }, - reinstallOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, options }, + spec: reinstallOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreControlPlanesReinstallResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -613,10 +631,8 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams ): Promise< - PollerLike< - PollOperationState< - PacketCoreControlPlanesCollectDiagnosticsPackageResponse - >, + SimplePollerLike< + OperationState, PacketCoreControlPlanesCollectDiagnosticsPackageResponse > > { @@ -626,7 +642,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -659,15 +675,23 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, parameters, options }, - collectDiagnosticsPackageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + parameters, + options + }, + spec: collectDiagnosticsPackageOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreControlPlanesCollectDiagnosticsPackageResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts index d1843e2f83d4..93cdba366e1e 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PacketCoreDataPlane, PacketCoreDataPlanesListByPacketCoreControlPlaneNextOptionalParams, @@ -140,14 +144,14 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -180,20 +184,20 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -261,8 +265,8 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreDataPlanesCreateOrUpdateResponse > > { @@ -272,7 +276,7 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -305,21 +309,24 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreDataPlanesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts index ee2bf8ecf296..09bcba2de96c 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Service, ServicesListByMobileNetworkNextOptionalParams, @@ -141,14 +145,14 @@ export class ServicesImpl implements Services { mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -181,15 +185,15 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, serviceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, serviceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -254,8 +258,8 @@ export class ServicesImpl implements Services { parameters: Service, options?: ServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesCreateOrUpdateResponse > > { @@ -265,7 +269,7 @@ export class ServicesImpl implements Services { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -298,21 +302,24 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, serviceName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts index e7db3f8a40bb..5538d6af55ca 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { SimGroup, SimGroupsListBySubscriptionNextOptionalParams, @@ -181,14 +185,14 @@ export class SimGroupsImpl implements SimGroups { resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,15 +225,15 @@ export class SimGroupsImpl implements SimGroups { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -284,8 +288,8 @@ export class SimGroupsImpl implements SimGroups { parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimGroupsCreateOrUpdateResponse > > { @@ -295,7 +299,7 @@ export class SimGroupsImpl implements SimGroups { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -328,15 +332,18 @@ export class SimGroupsImpl implements SimGroups { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SimGroupsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts index e747cd99859a..eea5bb42b94a 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { SimPolicy, SimPoliciesListByMobileNetworkNextOptionalParams, @@ -140,14 +144,14 @@ export class SimPoliciesImpl implements SimPolicies { mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -180,15 +184,15 @@ export class SimPoliciesImpl implements SimPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, simPolicyName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, simPolicyName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -250,8 +254,8 @@ export class SimPoliciesImpl implements SimPolicies { parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimPoliciesCreateOrUpdateResponse > > { @@ -261,7 +265,7 @@ export class SimPoliciesImpl implements SimPolicies { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -294,21 +298,24 @@ export class SimPoliciesImpl implements SimPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, simPolicyName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SimPoliciesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts index 809a016a1527..e881561d3e8d 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Sim, SimsListByGroupNextOptionalParams, @@ -146,14 +150,14 @@ export class SimsImpl implements Sims { simGroupName: string, simName: string, options?: SimsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -186,15 +190,15 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, simName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, simName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -256,8 +260,8 @@ export class SimsImpl implements Sims { parameters: Sim, options?: SimsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsCreateOrUpdateResponse > > { @@ -267,7 +271,7 @@ export class SimsImpl implements Sims { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -300,15 +304,18 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, simName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, simName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SimsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -369,8 +376,8 @@ export class SimsImpl implements Sims { parameters: SimUploadList, options?: SimsBulkUploadOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkUploadResponse > > { @@ -380,7 +387,7 @@ export class SimsImpl implements Sims { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -413,15 +420,18 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkUploadOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, parameters, options }, + spec: bulkUploadOperationSpec + }); + const poller = await createHttpPoller< + SimsBulkUploadResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -462,8 +472,8 @@ export class SimsImpl implements Sims { parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkDeleteResponse > > { @@ -473,7 +483,7 @@ export class SimsImpl implements Sims { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -506,15 +516,18 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkDeleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, parameters, options }, + spec: bulkDeleteOperationSpec + }); + const poller = await createHttpPoller< + SimsBulkDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -555,8 +568,8 @@ export class SimsImpl implements Sims { parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkUploadEncryptedResponse > > { @@ -566,7 +579,7 @@ export class SimsImpl implements Sims { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -599,15 +612,18 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkUploadEncryptedOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, parameters, options }, + spec: bulkUploadEncryptedOperationSpec + }); + const poller = await createHttpPoller< + SimsBulkUploadEncryptedResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts index 54cd3c1bd90c..cc056cbc9bfc 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Site, SitesListByMobileNetworkNextOptionalParams, @@ -141,14 +145,14 @@ export class SitesImpl implements Sites { mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -181,15 +185,15 @@ export class SitesImpl implements Sites { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, siteName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, siteName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -253,8 +257,8 @@ export class SitesImpl implements Sites { parameters: Site, options?: SitesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SitesCreateOrUpdateResponse > > { @@ -264,7 +268,7 @@ export class SitesImpl implements Sites { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -297,15 +301,24 @@ export class SitesImpl implements Sites { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, siteName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + mobileNetworkName, + siteName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SitesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts index 1377a61fce29..4f7a7b60782e 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Slice, SlicesListByMobileNetworkNextOptionalParams, @@ -140,14 +144,14 @@ export class SlicesImpl implements Slices { mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -180,15 +184,15 @@ export class SlicesImpl implements Slices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, sliceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, sliceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -251,8 +255,8 @@ export class SlicesImpl implements Slices { parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SlicesCreateOrUpdateResponse > > { @@ -262,7 +266,7 @@ export class SlicesImpl implements Slices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -295,15 +299,24 @@ export class SlicesImpl implements Slices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, sliceName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + mobileNetworkName, + sliceName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SlicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts index 502d29ee68ff..a740f7b97b97 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AttachedDataNetwork, AttachedDataNetworksListByPacketCoreDataPlaneOptionalParams, @@ -51,7 +51,7 @@ export interface AttachedDataNetworks { packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified attached data network. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -100,8 +100,8 @@ export interface AttachedDataNetworks { parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AttachedDataNetworksCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts index f73736c828d2..84374aacb2f0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DataNetwork, DataNetworksListByMobileNetworkOptionalParams, @@ -47,7 +47,7 @@ export interface DataNetworks { mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified data network. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -90,8 +90,8 @@ export interface DataNetworks { parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataNetworksCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts index 81f695fbd218..1f1c37e98d41 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { MobileNetwork, MobileNetworksListBySubscriptionOptionalParams, @@ -51,7 +51,7 @@ export interface MobileNetworks { resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -87,8 +87,8 @@ export interface MobileNetworks { parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MobileNetworksCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts index ac1083089d75..6a2bfbf3de85 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PacketCoreControlPlane, PacketCoreControlPlanesListBySubscriptionOptionalParams, @@ -58,7 +58,7 @@ export interface PacketCoreControlPlanes { resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -94,8 +94,8 @@ export interface PacketCoreControlPlanes { parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesCreateOrUpdateResponse > >; @@ -137,8 +137,8 @@ export interface PacketCoreControlPlanes { packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesRollbackResponse > >; @@ -166,8 +166,8 @@ export interface PacketCoreControlPlanes { packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesReinstallResponse > >; @@ -198,10 +198,8 @@ export interface PacketCoreControlPlanes { parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams ): Promise< - PollerLike< - PollOperationState< - PacketCoreControlPlanesCollectDiagnosticsPackageResponse - >, + SimplePollerLike< + OperationState, PacketCoreControlPlanesCollectDiagnosticsPackageResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts index 250106ed8056..cfc19bbdb0c0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PacketCoreDataPlane, PacketCoreDataPlanesListByPacketCoreControlPlaneOptionalParams, @@ -47,7 +47,7 @@ export interface PacketCoreDataPlanes { packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified packet core data plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -90,8 +90,8 @@ export interface PacketCoreDataPlanes { parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreDataPlanesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts index 671bfe40bb53..4b1c5a0464b4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Service, ServicesListByMobileNetworkOptionalParams, @@ -48,7 +48,7 @@ export interface Services { mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified service. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -93,8 +93,8 @@ export interface Services { parameters: Service, options?: ServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts index d865e349d57a..b44a74aa3808 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SimGroup, SimGroupsListBySubscriptionOptionalParams, @@ -51,7 +51,7 @@ export interface SimGroups { resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified SIM group. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -87,8 +87,8 @@ export interface SimGroups { parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimGroupsCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts index b1cffb1375d0..a9f3da4a5fc1 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SimPolicy, SimPoliciesListByMobileNetworkOptionalParams, @@ -47,7 +47,7 @@ export interface SimPolicies { mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified SIM policy. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -89,8 +89,8 @@ export interface SimPolicies { parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimPoliciesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts index 477d37cf39d3..e0c4a7d1f811 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Sim, SimsListByGroupOptionalParams, @@ -53,7 +53,7 @@ export interface Sims { simGroupName: string, simName: string, options?: SimsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -95,8 +95,8 @@ export interface Sims { parameters: Sim, options?: SimsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsCreateOrUpdateResponse > >; @@ -128,8 +128,8 @@ export interface Sims { parameters: SimUploadList, options?: SimsBulkUploadOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkUploadResponse > >; @@ -159,8 +159,8 @@ export interface Sims { parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkDeleteResponse > >; @@ -190,8 +190,8 @@ export interface Sims { parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkUploadEncryptedResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts index e875c0a409fe..edaf4e988cf0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Site, SitesListByMobileNetworkOptionalParams, @@ -48,7 +48,7 @@ export interface Sites { mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified mobile network site. This will also delete any network functions that are a * part of this site. @@ -92,8 +92,8 @@ export interface Sites { parameters: Site, options?: SitesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SitesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts index bcb7796c65c4..a956dd1b654d 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Slice, SlicesListByMobileNetworkOptionalParams, @@ -47,7 +47,7 @@ export interface Slices { mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified network slice. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -90,8 +90,8 @@ export interface Slices { parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SlicesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/tsconfig.json b/sdk/mobilenetwork/arm-mobilenetwork/tsconfig.json index d28d7de2857d..3e6ae96443f3 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/tsconfig.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-mobilenetwork": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"