diff --git a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md index 402dd46e644e..dd4169e66794 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md @@ -1,5 +1,42 @@ # Release History +## 2.0.0 (2022-12-26) + +**Features** + + - Added operation PacketCoreControlPlanes.beginCollectDiagnosticsPackage + - Added operation PacketCoreControlPlanes.beginCollectDiagnosticsPackageAndWait + - Added operation PacketCoreControlPlanes.beginReinstall + - Added operation PacketCoreControlPlanes.beginReinstallAndWait + - Added operation PacketCoreControlPlanes.beginRollback + - Added operation PacketCoreControlPlanes.beginRollbackAndWait + - Added operation Sims.beginBulkDelete + - Added operation Sims.beginBulkDeleteAndWait + - Added operation Sims.beginBulkUpload + - Added operation Sims.beginBulkUploadAndWait + - Added operation Sims.beginBulkUploadEncrypted + - Added operation Sims.beginBulkUploadEncryptedAndWait + - Added Interface PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams + - Added Interface PacketCoreControlPlanesReinstallOptionalParams + - Added Interface PacketCoreControlPlanesRollbackOptionalParams + - Added Interface SimsBulkDeleteOptionalParams + - Added Interface SimsBulkUploadEncryptedOptionalParams + - Added Interface SimsBulkUploadOptionalParams + - Added Type Alias PacketCoreControlPlanesCollectDiagnosticsPackageResponse + - Added Type Alias PacketCoreControlPlanesReinstallResponse + - Added Type Alias PacketCoreControlPlanesRollbackResponse + - Added Type Alias SimsBulkDeleteResponse + - Added Type Alias SimsBulkUploadEncryptedResponse + - Added Type Alias SimsBulkUploadResponse + +**Breaking Changes** + + - Removed operation group PacketCoreControlPlaneOperations + - Removed operation group SimOperations + - Class MobileNetworkManagementClient no longer has parameter packetCoreControlPlaneOperations + - Class MobileNetworkManagementClient no longer has parameter simOperations + + ## 1.0.0 (2022-12-15) The package of @azure/arm-mobilenetwork is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json index 68aab54ee9c9..8c84ad027724 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json @@ -1,8 +1,8 @@ { - "commit": "e8f7c894b59c9bb8a63f8d390a282a568ee85e4c", + "commit": "deda40e5c3ef0e10113c02919041effc1654d663", "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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mobilenetwork\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.5 --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.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.3", + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/package.json b/sdk/mobilenetwork/arm-mobilenetwork/package.json index b77a88093b78..b7eea79f9403 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/package.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MobileNetworkManagementClient.", - "version": "1.0.0", + "version": "2.0.0", "engines": { "node": ">=14.0.0" }, @@ -47,8 +47,7 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "dotenv": "^8.2.0" + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork", "repository": { @@ -111,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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 8d6ef0e1e0e3..da51762ebea2 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md @@ -518,8 +518,6 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // (undocumented) operations: Operations; // (undocumented) - packetCoreControlPlaneOperations: PacketCoreControlPlaneOperations; - // (undocumented) packetCoreControlPlanes: PacketCoreControlPlanes; // (undocumented) packetCoreControlPlaneVersions: PacketCoreControlPlaneVersions; @@ -530,8 +528,6 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // (undocumented) simGroups: SimGroups; // (undocumented) - simOperations: SimOperations; - // (undocumented) simPolicies: SimPolicies; // (undocumented) sims: Sims; @@ -701,61 +697,39 @@ export interface PacketCoreControlPlaneCollectDiagnosticsPackage { storageAccountBlobUrl: string; } -// @public -export interface PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PacketCoreControlPlaneCollectDiagnosticsPackageResponse = AsyncOperationStatus; - // @public export interface PacketCoreControlPlaneListResult { readonly nextLink?: string; value?: PacketCoreControlPlane[]; } -// @public -export interface PacketCoreControlPlaneOperations { - beginCollectDiagnosticsPackage(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams): Promise, PacketCoreControlPlaneCollectDiagnosticsPackageResponse>>; - beginCollectDiagnosticsPackageAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams): Promise; - beginReinstall(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlaneReinstallOptionalParams): Promise, PacketCoreControlPlaneReinstallResponse>>; - beginReinstallAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlaneReinstallOptionalParams): Promise; - beginRollback(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlaneRollbackOptionalParams): Promise, PacketCoreControlPlaneRollbackResponse>>; - beginRollbackAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlaneRollbackOptionalParams): Promise; -} - -// @public -export interface PacketCoreControlPlaneReinstallOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PacketCoreControlPlaneReinstallResponse = AsyncOperationStatus; - -// @public -export interface PacketCoreControlPlaneRollbackOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PacketCoreControlPlaneRollbackResponse = AsyncOperationStatus; - // @public export interface PacketCoreControlPlanes { + 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>>; beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams): Promise; 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>>; + beginReinstallAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams): Promise; + 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; listBySubscription(options?: PacketCoreControlPlanesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; updateTags(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: TagsObject, options?: PacketCoreControlPlanesUpdateTagsOptionalParams): Promise; } +// @public +export interface PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PacketCoreControlPlanesCollectDiagnosticsPackageResponse = AsyncOperationStatus; + // @public export interface PacketCoreControlPlanesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -806,6 +780,24 @@ export interface PacketCoreControlPlanesListBySubscriptionOptionalParams extends // @public export type PacketCoreControlPlanesListBySubscriptionResponse = PacketCoreControlPlaneListResult; +// @public +export interface PacketCoreControlPlanesReinstallOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PacketCoreControlPlanesReinstallResponse = AsyncOperationStatus; + +// @public +export interface PacketCoreControlPlanesRollbackOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PacketCoreControlPlanesRollbackResponse = AsyncOperationStatus; + // @public export interface PacketCoreControlPlanesUpdateTagsOptionalParams extends coreClient.OperationOptions { } @@ -1119,33 +1111,6 @@ export interface Sim extends ProxyResource { readonly vendorName?: string; } -// @public -export interface SimBulkDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SimBulkDeleteResponse = AsyncOperationStatus; - -// @public -export interface SimBulkUploadEncryptedOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SimBulkUploadEncryptedResponse = AsyncOperationStatus; - -// @public -export interface SimBulkUploadOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SimBulkUploadResponse = AsyncOperationStatus; - // @public export interface SimDeleteList { sims: string[]; @@ -1282,16 +1247,6 @@ export interface SimNameAndProperties { readonly vendorName?: string; } -// @public -export interface SimOperations { - beginBulkDelete(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimBulkDeleteOptionalParams): Promise, SimBulkDeleteResponse>>; - beginBulkDeleteAndWait(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimBulkDeleteOptionalParams): Promise; - beginBulkUpload(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimBulkUploadOptionalParams): Promise, SimBulkUploadResponse>>; - beginBulkUploadAndWait(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimBulkUploadOptionalParams): Promise; - beginBulkUploadEncrypted(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimBulkUploadEncryptedOptionalParams): Promise, SimBulkUploadEncryptedResponse>>; - beginBulkUploadEncryptedAndWait(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimBulkUploadEncryptedOptionalParams): Promise; -} - // @public export interface SimPolicies { beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams): Promise, SimPoliciesCreateOrUpdateResponse>>; @@ -1378,6 +1333,12 @@ export interface SimPropertiesFormat extends CommonSimPropertiesFormat { // @public export interface Sims { + 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>>; + beginBulkUploadAndWait(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimsBulkUploadOptionalParams): Promise; + 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>>; beginCreateOrUpdateAndWait(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise, void>>; @@ -1386,6 +1347,33 @@ export interface Sims { listByGroup(resourceGroupName: string, simGroupName: string, options?: SimsListByGroupOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface SimsBulkDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SimsBulkDeleteResponse = AsyncOperationStatus; + +// @public +export interface SimsBulkUploadEncryptedOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SimsBulkUploadEncryptedResponse = AsyncOperationStatus; + +// @public +export interface SimsBulkUploadOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SimsBulkUploadResponse = AsyncOperationStatus; + // @public export interface SimsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; 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/packetCoreControlPlaneCollectDiagnosticsPackageSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneCollectDiagnosticsPackageSample.ts deleted file mode 100644 index 846e0b2b190d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneCollectDiagnosticsPackageSample.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.packetCoreControlPlaneOperations.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneReinstallSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneReinstallSample.ts deleted file mode 100644 index 6c1c3bed8b04..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneReinstallSample.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.packetCoreControlPlaneOperations.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneRollbackSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneRollbackSample.ts deleted file mode 100644 index 5b9e13cda030..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneRollbackSample.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.packetCoreControlPlaneOperations.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -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/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/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/simBulkDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simBulkDeleteSample.ts deleted file mode 100644 index 93ecfbeda1e1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simBulkDeleteSample.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.simOperations.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simBulkUploadEncryptedSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simBulkUploadEncryptedSample.ts deleted file mode 100644 index 5001bd99ed3e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simBulkUploadEncryptedSample.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.simOperations.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simBulkUploadSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simBulkUploadSample.ts deleted file mode 100644 index 45b4af1c0ba4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simBulkUploadSample.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.simOperations.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -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/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/v1/javascript/README.md b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/README.md deleted file mode 100644 index 822e1f2e83c1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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 | -| [packetCoreControlPlaneCollectDiagnosticsPackageSample.js][packetcorecontrolplanecollectdiagnosticspackagesample] | 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 | -| [packetCoreControlPlaneReinstallSample.js][packetcorecontrolplanereinstallsample] | 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 | -| [packetCoreControlPlaneRollbackSample.js][packetcorecontrolplanerollbacksample] | 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 | -| [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 | -| [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 | -| [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 | -| [simBulkDeleteSample.js][simbulkdeletesample] | Bulk delete SIMs from a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json | -| [simBulkUploadEncryptedSample.js][simbulkuploadencryptedsample] | 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 | -| [simBulkUploadSample.js][simbulkuploadsample] | Bulk upload SIMs to a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.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 | -| [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/v1/javascript/attachedDataNetworksCreateOrUpdateSample.js -[attacheddatanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksDeleteSample.js -[attacheddatanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksGetSample.js -[attacheddatanetworkslistbypacketcoredataplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js -[attacheddatanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksUpdateTagsSample.js -[datanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksCreateOrUpdateSample.js -[datanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksDeleteSample.js -[datanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksGetSample.js -[datanetworkslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksListByMobileNetworkSample.js -[datanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksUpdateTagsSample.js -[mobilenetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksCreateOrUpdateSample.js -[mobilenetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksDeleteSample.js -[mobilenetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksGetSample.js -[mobilenetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksListByResourceGroupSample.js -[mobilenetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksListBySubscriptionSample.js -[mobilenetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksUpdateTagsSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/operationsListSample.js -[packetcorecontrolplanecollectdiagnosticspackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneCollectDiagnosticsPackageSample.js -[packetcorecontrolplanereinstallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneReinstallSample.js -[packetcorecontrolplanerollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneRollbackSample.js -[packetcorecontrolplaneversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneVersionsGetSample.js -[packetcorecontrolplaneversionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneVersionsListSample.js -[packetcorecontrolplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesCreateOrUpdateSample.js -[packetcorecontrolplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesDeleteSample.js -[packetcorecontrolplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesGetSample.js -[packetcorecontrolplaneslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesListByResourceGroupSample.js -[packetcorecontrolplaneslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesListBySubscriptionSample.js -[packetcorecontrolplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesUpdateTagsSample.js -[packetcoredataplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesCreateOrUpdateSample.js -[packetcoredataplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesDeleteSample.js -[packetcoredataplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesGetSample.js -[packetcoredataplaneslistbypacketcorecontrolplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js -[packetcoredataplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesUpdateTagsSample.js -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesCreateOrUpdateSample.js -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesDeleteSample.js -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesGetSample.js -[serviceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesListByMobileNetworkSample.js -[servicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesUpdateTagsSample.js -[simbulkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkDeleteSample.js -[simbulkuploadencryptedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkUploadEncryptedSample.js -[simbulkuploadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkUploadSample.js -[simgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsCreateOrUpdateSample.js -[simgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsDeleteSample.js -[simgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsGetSample.js -[simgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsListByResourceGroupSample.js -[simgroupslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsListBySubscriptionSample.js -[simgroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsUpdateTagsSample.js -[simpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesCreateOrUpdateSample.js -[simpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesDeleteSample.js -[simpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesGetSample.js -[simpolicieslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesListByMobileNetworkSample.js -[simpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesUpdateTagsSample.js -[simscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simsCreateOrUpdateSample.js -[simsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simsDeleteSample.js -[simsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simsGetSample.js -[simslistbygroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simsListByGroupSample.js -[sitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesCreateOrUpdateSample.js -[sitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesDeleteSample.js -[sitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesGetSample.js -[siteslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesListByMobileNetworkSample.js -[sitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesUpdateTagsSample.js -[slicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesCreateOrUpdateSample.js -[slicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesDeleteSample.js -[slicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesGetSample.js -[sliceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesListByMobileNetworkSample.js -[slicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/attachedDataNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksCreateOrUpdateSample.js deleted file mode 100644 index 5c6baf742af0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/attachedDataNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksDeleteSample.js deleted file mode 100644 index 4fa14dfb5903..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/attachedDataNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksGetSample.js deleted file mode 100644 index c25e405e65c1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js deleted file mode 100644 index 7ed2b68928a9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/attachedDataNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/attachedDataNetworksUpdateTagsSample.js deleted file mode 100644 index db0c8a0cbf86..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/dataNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksCreateOrUpdateSample.js deleted file mode 100644 index 3838c7f63f3a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/dataNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksDeleteSample.js deleted file mode 100644 index 83e782be4951..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/dataNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksGetSample.js deleted file mode 100644 index 9f891ba74cc1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/dataNetworksListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksListByMobileNetworkSample.js deleted file mode 100644 index bd68fd6667ca..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/dataNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/dataNetworksUpdateTagsSample.js deleted file mode 100644 index 5a7c0ed1216e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/mobileNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksCreateOrUpdateSample.js deleted file mode 100644 index 65b194a8d8f8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/mobileNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksDeleteSample.js deleted file mode 100644 index e055bdd47b5e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/mobileNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksGetSample.js deleted file mode 100644 index f2bf80ac8e0d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/mobileNetworksListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksListByResourceGroupSample.js deleted file mode 100644 index 675f5c83a76b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/mobileNetworksListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksListBySubscriptionSample.js deleted file mode 100644 index 25b34e8be0eb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/mobileNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/mobileNetworksUpdateTagsSample.js deleted file mode 100644 index 8cd4ff6e11f6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/operationsListSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/operationsListSample.js deleted file mode 100644 index 9b210d381733..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/package.json deleted file mode 100644 index b221a595c7d9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreControlPlaneCollectDiagnosticsPackageSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneCollectDiagnosticsPackageSample.js deleted file mode 100644 index 39958a8edec1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneCollectDiagnosticsPackageSample.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 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.packetCoreControlPlaneOperations.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneReinstallSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneReinstallSample.js deleted file mode 100644 index d172a89a4dc1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneReinstallSample.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.packetCoreControlPlaneOperations.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneRollbackSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneRollbackSample.js deleted file mode 100644 index 130db576a1b9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneRollbackSample.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.packetCoreControlPlaneOperations.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneVersionsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneVersionsGetSample.js deleted file mode 100644 index 9fe9b159ac29..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreControlPlaneVersionsListSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlaneVersionsListSample.js deleted file mode 100644 index 87c07bdd5692..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreControlPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesCreateOrUpdateSample.js deleted file mode 100644 index a069cfbee225..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreControlPlanesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesDeleteSample.js deleted file mode 100644 index c16c159dfd4e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreControlPlanesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesGetSample.js deleted file mode 100644 index 9a78d681c849..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreControlPlanesListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesListByResourceGroupSample.js deleted file mode 100644 index 1222e962443f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreControlPlanesListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesListBySubscriptionSample.js deleted file mode 100644 index 9b8c03ac6fdf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreControlPlanesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreControlPlanesUpdateTagsSample.js deleted file mode 100644 index 5c9fdc0fa743..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreDataPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesCreateOrUpdateSample.js deleted file mode 100644 index 4cb0d26b9b96..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreDataPlanesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesDeleteSample.js deleted file mode 100644 index 65180b09db86..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreDataPlanesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesGetSample.js deleted file mode 100644 index f3f13e209849..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js deleted file mode 100644 index 8f00484cd85f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/packetCoreDataPlanesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/packetCoreDataPlanesUpdateTagsSample.js deleted file mode 100644 index 4fcbc0cd6ba6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/servicesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesCreateOrUpdateSample.js deleted file mode 100644 index 493fcbff5100..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/servicesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesDeleteSample.js deleted file mode 100644 index 8ee76e2ac9d3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/servicesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesGetSample.js deleted file mode 100644 index 44029429ee7d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/servicesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesListByMobileNetworkSample.js deleted file mode 100644 index b696c9b8d3da..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/servicesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/servicesUpdateTagsSample.js deleted file mode 100644 index 48fabe896633..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simBulkDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkDeleteSample.js deleted file mode 100644 index fd8a9edbce6d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkDeleteSample.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.simOperations.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkUploadEncryptedSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkUploadEncryptedSample.js deleted file mode 100644 index 76beac78cc3e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkUploadEncryptedSample.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.simOperations.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkUploadSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkUploadSample.js deleted file mode 100644 index 7e98af49ec0e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simBulkUploadSample.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.simOperations.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsCreateOrUpdateSample.js deleted file mode 100644 index 39b158bd1513..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simGroupsDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsDeleteSample.js deleted file mode 100644 index 62d2675612cb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simGroupsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsGetSample.js deleted file mode 100644 index b8959fa8b952..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simGroupsListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsListByResourceGroupSample.js deleted file mode 100644 index 43b025340716..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simGroupsListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsListBySubscriptionSample.js deleted file mode 100644 index cf0f521eee9d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simGroupsUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simGroupsUpdateTagsSample.js deleted file mode 100644 index 13ee992e77e4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simPoliciesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 63acb08870e3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simPoliciesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesDeleteSample.js deleted file mode 100644 index 67c26fcae9b3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simPoliciesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesGetSample.js deleted file mode 100644 index de4390217047..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simPoliciesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesListByMobileNetworkSample.js deleted file mode 100644 index f6816ca50f69..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simPoliciesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simPoliciesUpdateTagsSample.js deleted file mode 100644 index 5f52f825e11c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simsCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simsCreateOrUpdateSample.js deleted file mode 100644 index 33c26594009f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simsDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simsDeleteSample.js deleted file mode 100644 index 3ee07847cdf6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simsGetSample.js deleted file mode 100644 index 64f9dbfd1cbb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/simsListByGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/simsListByGroupSample.js deleted file mode 100644 index bd46ee89bb4a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/sitesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesCreateOrUpdateSample.js deleted file mode 100644 index 3431a47df3f5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/sitesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesDeleteSample.js deleted file mode 100644 index 961e267ee931..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/sitesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesGetSample.js deleted file mode 100644 index 265ec610c26e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/sitesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesListByMobileNetworkSample.js deleted file mode 100644 index af1a56267d19..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/sitesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/sitesUpdateTagsSample.js deleted file mode 100644 index 040d6d57fd44..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/slicesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesCreateOrUpdateSample.js deleted file mode 100644 index 191e4c0da218..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/slicesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesDeleteSample.js deleted file mode 100644 index 795c8b192469..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/slicesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesGetSample.js deleted file mode 100644 index f77ee0471014..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/slicesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesListByMobileNetworkSample.js deleted file mode 100644 index 3445fc7496af..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/javascript/slicesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/javascript/slicesUpdateTagsSample.js deleted file mode 100644 index 6bb334d73838..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/README.md b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/README.md deleted file mode 100644 index 567a5d81ec08..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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 | -| [packetCoreControlPlaneCollectDiagnosticsPackageSample.ts][packetcorecontrolplanecollectdiagnosticspackagesample] | 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 | -| [packetCoreControlPlaneReinstallSample.ts][packetcorecontrolplanereinstallsample] | 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 | -| [packetCoreControlPlaneRollbackSample.ts][packetcorecontrolplanerollbacksample] | 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 | -| [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 | -| [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 | -| [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 | -| [simBulkDeleteSample.ts][simbulkdeletesample] | Bulk delete SIMs from a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json | -| [simBulkUploadEncryptedSample.ts][simbulkuploadencryptedsample] | 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 | -| [simBulkUploadSample.ts][simbulkuploadsample] | Bulk upload SIMs to a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.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 | -| [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/v1/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts -[attacheddatanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksDeleteSample.ts -[attacheddatanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksGetSample.ts -[attacheddatanetworkslistbypacketcoredataplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts -[attacheddatanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksUpdateTagsSample.ts -[datanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksCreateOrUpdateSample.ts -[datanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksDeleteSample.ts -[datanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksGetSample.ts -[datanetworkslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksListByMobileNetworkSample.ts -[datanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksUpdateTagsSample.ts -[mobilenetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksCreateOrUpdateSample.ts -[mobilenetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksDeleteSample.ts -[mobilenetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksGetSample.ts -[mobilenetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksListByResourceGroupSample.ts -[mobilenetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksListBySubscriptionSample.ts -[mobilenetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksUpdateTagsSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/operationsListSample.ts -[packetcorecontrolplanecollectdiagnosticspackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneCollectDiagnosticsPackageSample.ts -[packetcorecontrolplanereinstallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneReinstallSample.ts -[packetcorecontrolplanerollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneRollbackSample.ts -[packetcorecontrolplaneversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneVersionsGetSample.ts -[packetcorecontrolplaneversionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneVersionsListSample.ts -[packetcorecontrolplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts -[packetcorecontrolplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesDeleteSample.ts -[packetcorecontrolplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesGetSample.ts -[packetcorecontrolplaneslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts -[packetcorecontrolplaneslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts -[packetcorecontrolplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts -[packetcoredataplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts -[packetcoredataplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesDeleteSample.ts -[packetcoredataplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesGetSample.ts -[packetcoredataplaneslistbypacketcorecontrolplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts -[packetcoredataplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesDeleteSample.ts -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesGetSample.ts -[serviceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesListByMobileNetworkSample.ts -[servicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesUpdateTagsSample.ts -[simbulkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkDeleteSample.ts -[simbulkuploadencryptedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkUploadEncryptedSample.ts -[simbulkuploadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkUploadSample.ts -[simgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsCreateOrUpdateSample.ts -[simgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsDeleteSample.ts -[simgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsGetSample.ts -[simgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsListByResourceGroupSample.ts -[simgroupslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsListBySubscriptionSample.ts -[simgroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsUpdateTagsSample.ts -[simpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesCreateOrUpdateSample.ts -[simpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesDeleteSample.ts -[simpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesGetSample.ts -[simpolicieslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesListByMobileNetworkSample.ts -[simpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesUpdateTagsSample.ts -[simscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simsCreateOrUpdateSample.ts -[simsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simsDeleteSample.ts -[simsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simsGetSample.ts -[simslistbygroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simsListByGroupSample.ts -[sitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesCreateOrUpdateSample.ts -[sitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesDeleteSample.ts -[sitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesGetSample.ts -[siteslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesListByMobileNetworkSample.ts -[sitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesUpdateTagsSample.ts -[slicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesCreateOrUpdateSample.ts -[slicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesDeleteSample.ts -[slicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesGetSample.ts -[sliceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesListByMobileNetworkSample.ts -[slicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/package.json deleted file mode 100644 index 9755f88f7427..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 791c63bdec48..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/attachedDataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksDeleteSample.ts deleted file mode 100644 index e30cf94458c7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/attachedDataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksGetSample.ts deleted file mode 100644 index b6badff4dcb2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts deleted file mode 100644 index 744af2341db7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/attachedDataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/attachedDataNetworksUpdateTagsSample.ts deleted file mode 100644 index e3b12165d513..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/dataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 983eb31c63e4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/dataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksDeleteSample.ts deleted file mode 100644 index c37d17fb818b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/dataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksGetSample.ts deleted file mode 100644 index c305a7fae7b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/dataNetworksListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksListByMobileNetworkSample.ts deleted file mode 100644 index f558493bee5d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/dataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/dataNetworksUpdateTagsSample.ts deleted file mode 100644 index 4b6edda19847..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/mobileNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 7ba80547b2ae..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/mobileNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksDeleteSample.ts deleted file mode 100644 index 2e35d2a808a2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/mobileNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksGetSample.ts deleted file mode 100644 index f8bb34b1370f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/mobileNetworksListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksListByResourceGroupSample.ts deleted file mode 100644 index 348fc0ea2d4c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/mobileNetworksListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksListBySubscriptionSample.ts deleted file mode 100644 index e91d8627cc38..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/mobileNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/mobileNetworksUpdateTagsSample.ts deleted file mode 100644 index d86c8fe08f93..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/operationsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/operationsListSample.ts deleted file mode 100644 index 7d825d29dfc5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreControlPlaneCollectDiagnosticsPackageSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneCollectDiagnosticsPackageSample.ts deleted file mode 100644 index 846e0b2b190d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneCollectDiagnosticsPackageSample.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.packetCoreControlPlaneOperations.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneReinstallSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneReinstallSample.ts deleted file mode 100644 index 6c1c3bed8b04..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneReinstallSample.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.packetCoreControlPlaneOperations.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneRollbackSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneRollbackSample.ts deleted file mode 100644 index 5b9e13cda030..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneRollbackSample.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.packetCoreControlPlaneOperations.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneVersionsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneVersionsGetSample.ts deleted file mode 100644 index 1ce3132540dc..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreControlPlaneVersionsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlaneVersionsListSample.ts deleted file mode 100644 index 63dad3ce3740..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts deleted file mode 100644 index 94ba54de44c9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreControlPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesDeleteSample.ts deleted file mode 100644 index 49f71c97173d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreControlPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesGetSample.ts deleted file mode 100644 index 3ea686ce575a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts deleted file mode 100644 index e90c72ed77b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts deleted file mode 100644 index fb15bca1e86c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts deleted file mode 100644 index f39687caf496..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts deleted file mode 100644 index edd571d456d6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreDataPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesDeleteSample.ts deleted file mode 100644 index 2a2549793ced..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreDataPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesGetSample.ts deleted file mode 100644 index d11c47f32dd7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts deleted file mode 100644 index 241fc5e80d5a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts deleted file mode 100644 index 0e9f7219fb45..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesCreateOrUpdateSample.ts deleted file mode 100644 index 2da2d56bdfbd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/servicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesDeleteSample.ts deleted file mode 100644 index d88a2200fa0d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/servicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesGetSample.ts deleted file mode 100644 index 449dc95ceebb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/servicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesListByMobileNetworkSample.ts deleted file mode 100644 index 062b74b905cf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/servicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/servicesUpdateTagsSample.ts deleted file mode 100644 index 602401786129..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simBulkDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkDeleteSample.ts deleted file mode 100644 index 93ecfbeda1e1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkDeleteSample.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.simOperations.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkUploadEncryptedSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkUploadEncryptedSample.ts deleted file mode 100644 index 5001bd99ed3e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkUploadEncryptedSample.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.simOperations.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkUploadSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkUploadSample.ts deleted file mode 100644 index 45b4af1c0ba4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simBulkUploadSample.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.simOperations.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsCreateOrUpdateSample.ts deleted file mode 100644 index b29f8da76579..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simGroupsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsDeleteSample.ts deleted file mode 100644 index 5974e50c1dda..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simGroupsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsGetSample.ts deleted file mode 100644 index 7a9321529546..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simGroupsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsListByResourceGroupSample.ts deleted file mode 100644 index fcb77b783ce7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simGroupsListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsListBySubscriptionSample.ts deleted file mode 100644 index c07ede93010e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simGroupsUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simGroupsUpdateTagsSample.ts deleted file mode 100644 index 41f82587eef1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simPoliciesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b31d5132bded..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simPoliciesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesDeleteSample.ts deleted file mode 100644 index 3623dc896150..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simPoliciesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesGetSample.ts deleted file mode 100644 index 8888aca9e9bf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simPoliciesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesListByMobileNetworkSample.ts deleted file mode 100644 index d6a3b11cc289..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simPoliciesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simPoliciesUpdateTagsSample.ts deleted file mode 100644 index 59f5c0deaa28..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simsCreateOrUpdateSample.ts deleted file mode 100644 index c89f9eb7af9e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simsDeleteSample.ts deleted file mode 100644 index 7594ebc087c3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simsGetSample.ts deleted file mode 100644 index b9a1c49588aa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/simsListByGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/simsListByGroupSample.ts deleted file mode 100644 index cf9dfb280889..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/sitesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesCreateOrUpdateSample.ts deleted file mode 100644 index b179193e3e4f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/sitesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesDeleteSample.ts deleted file mode 100644 index 7dfa11437e35..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/sitesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesGetSample.ts deleted file mode 100644 index ec161f781273..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/sitesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesListByMobileNetworkSample.ts deleted file mode 100644 index 76a412869c34..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/sitesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/sitesUpdateTagsSample.ts deleted file mode 100644 index 744a383a9965..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/slicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesCreateOrUpdateSample.ts deleted file mode 100644 index fd31b3910902..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/slicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesDeleteSample.ts deleted file mode 100644 index 1449d3596972..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/slicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesGetSample.ts deleted file mode 100644 index 28f4267ea223..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/slicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesListByMobileNetworkSample.ts deleted file mode 100644 index 78adb935b053..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/src/slicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/src/slicesUpdateTagsSample.ts deleted file mode 100644 index d0970a3bb8a5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/v1/typescript/tsconfig.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1/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/mobileNetworkManagementClient.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts index bc854f961219..45f3cdea536f 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts @@ -20,12 +20,10 @@ import { MobileNetworksImpl, OperationsImpl, PacketCoreControlPlanesImpl, - PacketCoreControlPlaneOperationsImpl, PacketCoreControlPlaneVersionsImpl, PacketCoreDataPlanesImpl, ServicesImpl, SimsImpl, - SimOperationsImpl, SimGroupsImpl, SimPoliciesImpl, SitesImpl, @@ -37,12 +35,10 @@ import { MobileNetworks, Operations, PacketCoreControlPlanes, - PacketCoreControlPlaneOperations, PacketCoreControlPlaneVersions, PacketCoreDataPlanes, Services, Sims, - SimOperations, SimGroups, SimPolicies, Sites, @@ -82,7 +78,7 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mobilenetwork/1.0.0`; + const packageDetails = `azsdk-js-arm-mobilenetwork/2.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -141,16 +137,12 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { this.mobileNetworks = new MobileNetworksImpl(this); this.operations = new OperationsImpl(this); this.packetCoreControlPlanes = new PacketCoreControlPlanesImpl(this); - this.packetCoreControlPlaneOperations = new PacketCoreControlPlaneOperationsImpl( - this - ); this.packetCoreControlPlaneVersions = new PacketCoreControlPlaneVersionsImpl( this ); this.packetCoreDataPlanes = new PacketCoreDataPlanesImpl(this); this.services = new ServicesImpl(this); this.sims = new SimsImpl(this); - this.simOperations = new SimOperationsImpl(this); this.simGroups = new SimGroupsImpl(this); this.simPolicies = new SimPoliciesImpl(this); this.sites = new SitesImpl(this); @@ -191,12 +183,10 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { mobileNetworks: MobileNetworks; operations: Operations; packetCoreControlPlanes: PacketCoreControlPlanes; - packetCoreControlPlaneOperations: PacketCoreControlPlaneOperations; packetCoreControlPlaneVersions: PacketCoreControlPlaneVersions; packetCoreDataPlanes: PacketCoreDataPlanes; services: Services; sims: Sims; - simOperations: SimOperations; simGroups: SimGroups; simPolicies: SimPolicies; sites: Sites; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts index d65a6509cb44..c28fe5375832 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts @@ -1793,21 +1793,7 @@ export interface PacketCoreControlPlanesListByResourceGroupOptionalParams export type PacketCoreControlPlanesListByResourceGroupResponse = PacketCoreControlPlaneListResult; /** Optional parameters. */ -export interface PacketCoreControlPlanesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type PacketCoreControlPlanesListBySubscriptionNextResponse = PacketCoreControlPlaneListResult; - -/** Optional parameters. */ -export interface PacketCoreControlPlanesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type PacketCoreControlPlanesListByResourceGroupNextResponse = PacketCoreControlPlaneListResult; - -/** Optional parameters. */ -export interface PacketCoreControlPlaneRollbackOptionalParams +export interface PacketCoreControlPlanesRollbackOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1816,10 +1802,10 @@ export interface PacketCoreControlPlaneRollbackOptionalParams } /** Contains response data for the rollback operation. */ -export type PacketCoreControlPlaneRollbackResponse = AsyncOperationStatus; +export type PacketCoreControlPlanesRollbackResponse = AsyncOperationStatus; /** Optional parameters. */ -export interface PacketCoreControlPlaneReinstallOptionalParams +export interface PacketCoreControlPlanesReinstallOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1828,10 +1814,10 @@ export interface PacketCoreControlPlaneReinstallOptionalParams } /** Contains response data for the reinstall operation. */ -export type PacketCoreControlPlaneReinstallResponse = AsyncOperationStatus; +export type PacketCoreControlPlanesReinstallResponse = AsyncOperationStatus; /** Optional parameters. */ -export interface PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams +export interface PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1840,7 +1826,21 @@ export interface PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams } /** Contains response data for the collectDiagnosticsPackage operation. */ -export type PacketCoreControlPlaneCollectDiagnosticsPackageResponse = AsyncOperationStatus; +export type PacketCoreControlPlanesCollectDiagnosticsPackageResponse = AsyncOperationStatus; + +/** Optional parameters. */ +export interface PacketCoreControlPlanesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type PacketCoreControlPlanesListBySubscriptionNextResponse = PacketCoreControlPlaneListResult; + +/** Optional parameters. */ +export interface PacketCoreControlPlanesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PacketCoreControlPlanesListByResourceGroupNextResponse = PacketCoreControlPlaneListResult; /** Optional parameters. */ export interface PacketCoreControlPlaneVersionsGetOptionalParams @@ -1995,14 +1995,7 @@ export interface SimsListByGroupOptionalParams export type SimsListByGroupResponse = SimListResult; /** Optional parameters. */ -export interface SimsListByGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByGroupNext operation. */ -export type SimsListByGroupNextResponse = SimListResult; - -/** Optional parameters. */ -export interface SimBulkUploadOptionalParams +export interface SimsBulkUploadOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -2011,10 +2004,10 @@ export interface SimBulkUploadOptionalParams } /** Contains response data for the bulkUpload operation. */ -export type SimBulkUploadResponse = AsyncOperationStatus; +export type SimsBulkUploadResponse = AsyncOperationStatus; /** Optional parameters. */ -export interface SimBulkDeleteOptionalParams +export interface SimsBulkDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -2023,10 +2016,10 @@ export interface SimBulkDeleteOptionalParams } /** Contains response data for the bulkDelete operation. */ -export type SimBulkDeleteResponse = AsyncOperationStatus; +export type SimsBulkDeleteResponse = AsyncOperationStatus; /** Optional parameters. */ -export interface SimBulkUploadEncryptedOptionalParams +export interface SimsBulkUploadEncryptedOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -2035,7 +2028,14 @@ export interface SimBulkUploadEncryptedOptionalParams } /** Contains response data for the bulkUploadEncrypted operation. */ -export type SimBulkUploadEncryptedResponse = AsyncOperationStatus; +export type SimsBulkUploadEncryptedResponse = AsyncOperationStatus; + +/** Optional parameters. */ +export interface SimsListByGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByGroupNext operation. */ +export type SimsListByGroupNextResponse = SimListResult; /** Optional parameters. */ export interface SimGroupsDeleteOptionalParams diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts index b5fbea4bf05f..7fa4a6da8f4f 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts @@ -11,12 +11,10 @@ export * from "./dataNetworks"; export * from "./mobileNetworks"; export * from "./operations"; export * from "./packetCoreControlPlanes"; -export * from "./packetCoreControlPlaneOperations"; export * from "./packetCoreControlPlaneVersions"; export * from "./packetCoreDataPlanes"; export * from "./services"; export * from "./sims"; -export * from "./simOperations"; export * from "./simGroups"; export * from "./simPolicies"; export * from "./sites"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneOperations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneOperations.ts deleted file mode 100644 index 12f6e6853661..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneOperations.ts +++ /dev/null @@ -1,415 +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. - */ - -import { PacketCoreControlPlaneOperations } from "../operationsInterfaces"; -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 { - PacketCoreControlPlaneRollbackOptionalParams, - PacketCoreControlPlaneRollbackResponse, - PacketCoreControlPlaneReinstallOptionalParams, - PacketCoreControlPlaneReinstallResponse, - PacketCoreControlPlaneCollectDiagnosticsPackage, - PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams, - PacketCoreControlPlaneCollectDiagnosticsPackageResponse -} from "../models"; - -/** Class containing PacketCoreControlPlaneOperations operations. */ -export class PacketCoreControlPlaneOperationsImpl - implements PacketCoreControlPlaneOperations { - private readonly client: MobileNetworkManagementClient; - - /** - * Initialize a new instance of the class PacketCoreControlPlaneOperations class. - * @param client Reference to the service client - */ - constructor(client: MobileNetworkManagementClient) { - this.client = client; - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param options The options parameters. - */ - async beginRollback( - resourceGroupName: string, - packetCoreControlPlaneName: string, - options?: PacketCoreControlPlaneRollbackOptionalParams - ): Promise< - PollerLike< - PollOperationState, - PacketCoreControlPlaneRollbackResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, options }, - rollbackOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param options The options parameters. - */ - async beginRollbackAndWait( - resourceGroupName: string, - packetCoreControlPlaneName: string, - options?: PacketCoreControlPlaneRollbackOptionalParams - ): Promise { - const poller = await this.beginRollback( - resourceGroupName, - packetCoreControlPlaneName, - options - ); - return poller.pollUntilDone(); - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param options The options parameters. - */ - async beginReinstall( - resourceGroupName: string, - packetCoreControlPlaneName: string, - options?: PacketCoreControlPlaneReinstallOptionalParams - ): Promise< - PollerLike< - PollOperationState, - PacketCoreControlPlaneReinstallResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, options }, - reinstallOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param options The options parameters. - */ - async beginReinstallAndWait( - resourceGroupName: string, - packetCoreControlPlaneName: string, - options?: PacketCoreControlPlaneReinstallOptionalParams - ): Promise { - const poller = await this.beginReinstall( - resourceGroupName, - packetCoreControlPlaneName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload - * the diagnostics to a storage account. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package - * operation. - * @param options The options parameters. - */ - async beginCollectDiagnosticsPackage( - resourceGroupName: string, - packetCoreControlPlaneName: string, - parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, - options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams - ): Promise< - PollerLike< - PollOperationState< - PacketCoreControlPlaneCollectDiagnosticsPackageResponse - >, - PacketCoreControlPlaneCollectDiagnosticsPackageResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, parameters, options }, - collectDiagnosticsPackageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload - * the diagnostics to a storage account. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package - * operation. - * @param options The options parameters. - */ - async beginCollectDiagnosticsPackageAndWait( - resourceGroupName: string, - packetCoreControlPlaneName: string, - parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, - options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams - ): Promise { - const poller = await this.beginCollectDiagnosticsPackage( - resourceGroupName, - packetCoreControlPlaneName, - parameters, - options - ); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const rollbackOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 201: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 202: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 204: { - bodyMapper: Mappers.AsyncOperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.packetCoreControlPlaneName - ], - headerParameters: [Parameters.accept], - serializer -}; -const reinstallOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 201: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 202: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 204: { - bodyMapper: Mappers.AsyncOperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.packetCoreControlPlaneName - ], - headerParameters: [Parameters.accept], - serializer -}; -const collectDiagnosticsPackageOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 201: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 202: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 204: { - bodyMapper: Mappers.AsyncOperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.packetCoreControlPlaneName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts index 6866e542ea17..f056f55d735e 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts @@ -31,6 +31,13 @@ import { TagsObject, PacketCoreControlPlanesUpdateTagsOptionalParams, PacketCoreControlPlanesUpdateTagsResponse, + PacketCoreControlPlanesRollbackOptionalParams, + PacketCoreControlPlanesRollbackResponse, + PacketCoreControlPlanesReinstallOptionalParams, + PacketCoreControlPlanesReinstallResponse, + PacketCoreControlPlaneCollectDiagnosticsPackage, + PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams, + PacketCoreControlPlanesCollectDiagnosticsPackageResponse, PacketCoreControlPlanesListBySubscriptionNextResponse, PacketCoreControlPlanesListByResourceGroupNextResponse } from "../models"; @@ -411,6 +418,285 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ); } + /** + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + async beginRollback( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlanesRollbackOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PacketCoreControlPlanesRollbackResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, packetCoreControlPlaneName, options }, + rollbackOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + async beginRollbackAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlanesRollbackOptionalParams + ): Promise { + const poller = await this.beginRollback( + resourceGroupName, + packetCoreControlPlaneName, + options + ); + return poller.pollUntilDone(); + } + + /** + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + async beginReinstall( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlanesReinstallOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PacketCoreControlPlanesReinstallResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, packetCoreControlPlaneName, options }, + reinstallOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + async beginReinstallAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlanesReinstallOptionalParams + ): Promise { + const poller = await this.beginReinstall( + resourceGroupName, + packetCoreControlPlaneName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload + * the diagnostics to a storage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package + * operation. + * @param options The options parameters. + */ + async beginCollectDiagnosticsPackage( + resourceGroupName: string, + packetCoreControlPlaneName: string, + parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, + options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PacketCoreControlPlanesCollectDiagnosticsPackageResponse + >, + PacketCoreControlPlanesCollectDiagnosticsPackageResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, packetCoreControlPlaneName, parameters, options }, + collectDiagnosticsPackageOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload + * the diagnostics to a storage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package + * operation. + * @param options The options parameters. + */ + async beginCollectDiagnosticsPackageAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, + options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams + ): Promise { + const poller = await this.beginCollectDiagnosticsPackage( + resourceGroupName, + packetCoreControlPlaneName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -586,6 +872,101 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const rollbackOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName + ], + headerParameters: [Parameters.accept], + serializer +}; +const reinstallOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName + ], + headerParameters: [Parameters.accept], + serializer +}; +const collectDiagnosticsPackageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simOperations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simOperations.ts deleted file mode 100644 index 50f089c8773a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simOperations.ts +++ /dev/null @@ -1,414 +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. - */ - -import { SimOperations } from "../operationsInterfaces"; -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 { - SimUploadList, - SimBulkUploadOptionalParams, - SimBulkUploadResponse, - SimDeleteList, - SimBulkDeleteOptionalParams, - SimBulkDeleteResponse, - EncryptedSimUploadList, - SimBulkUploadEncryptedOptionalParams, - SimBulkUploadEncryptedResponse -} from "../models"; - -/** Class containing SimOperations operations. */ -export class SimOperationsImpl implements SimOperations { - private readonly client: MobileNetworkManagementClient; - - /** - * Initialize a new instance of the class SimOperations class. - * @param client Reference to the service client - */ - constructor(client: MobileNetworkManagementClient) { - this.client = client; - } - - /** - * Bulk upload SIMs to a SIM group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param options The options parameters. - */ - async beginBulkUpload( - resourceGroupName: string, - simGroupName: string, - parameters: SimUploadList, - options?: SimBulkUploadOptionalParams - ): Promise< - PollerLike, SimBulkUploadResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkUploadOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Bulk upload SIMs to a SIM group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param options The options parameters. - */ - async beginBulkUploadAndWait( - resourceGroupName: string, - simGroupName: string, - parameters: SimUploadList, - options?: SimBulkUploadOptionalParams - ): Promise { - const poller = await this.beginBulkUpload( - resourceGroupName, - simGroupName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Bulk delete SIMs from a SIM group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param options The options parameters. - */ - async beginBulkDelete( - resourceGroupName: string, - simGroupName: string, - parameters: SimDeleteList, - options?: SimBulkDeleteOptionalParams - ): Promise< - PollerLike, SimBulkDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkDeleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Bulk delete SIMs from a SIM group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param options The options parameters. - */ - async beginBulkDeleteAndWait( - resourceGroupName: string, - simGroupName: string, - parameters: SimDeleteList, - options?: SimBulkDeleteOptionalParams - ): Promise { - const poller = await this.beginBulkDelete( - resourceGroupName, - simGroupName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param options The options parameters. - */ - async beginBulkUploadEncrypted( - resourceGroupName: string, - simGroupName: string, - parameters: EncryptedSimUploadList, - options?: SimBulkUploadEncryptedOptionalParams - ): Promise< - PollerLike< - PollOperationState, - SimBulkUploadEncryptedResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkUploadEncryptedOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param options The options parameters. - */ - async beginBulkUploadEncryptedAndWait( - resourceGroupName: string, - simGroupName: string, - parameters: EncryptedSimUploadList, - options?: SimBulkUploadEncryptedOptionalParams - ): Promise { - const poller = await this.beginBulkUploadEncrypted( - resourceGroupName, - simGroupName, - parameters, - options - ); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const bulkUploadOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 201: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 202: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 204: { - bodyMapper: Mappers.AsyncOperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.simGroupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const bulkDeleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 201: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 202: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 204: { - bodyMapper: Mappers.AsyncOperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.simGroupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const bulkUploadEncryptedOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 201: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 202: { - bodyMapper: Mappers.AsyncOperationStatus - }, - 204: { - bodyMapper: Mappers.AsyncOperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.simGroupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts index 589f742e5e4b..809a016a1527 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts @@ -25,6 +25,15 @@ import { SimsGetResponse, SimsCreateOrUpdateOptionalParams, SimsCreateOrUpdateResponse, + SimUploadList, + SimsBulkUploadOptionalParams, + SimsBulkUploadResponse, + SimDeleteList, + SimsBulkDeleteOptionalParams, + SimsBulkDeleteResponse, + EncryptedSimUploadList, + SimsBulkUploadEncryptedOptionalParams, + SimsBulkUploadEncryptedResponse, SimsListByGroupNextResponse } from "../models"; @@ -347,6 +356,285 @@ export class SimsImpl implements Sims { ); } + /** + * Bulk upload SIMs to a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param options The options parameters. + */ + async beginBulkUpload( + resourceGroupName: string, + simGroupName: string, + parameters: SimUploadList, + options?: SimsBulkUploadOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimsBulkUploadResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, simGroupName, parameters, options }, + bulkUploadOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Bulk upload SIMs to a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param options The options parameters. + */ + async beginBulkUploadAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimUploadList, + options?: SimsBulkUploadOptionalParams + ): Promise { + const poller = await this.beginBulkUpload( + resourceGroupName, + simGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Bulk delete SIMs from a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param options The options parameters. + */ + async beginBulkDelete( + resourceGroupName: string, + simGroupName: string, + parameters: SimDeleteList, + options?: SimsBulkDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimsBulkDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, simGroupName, parameters, options }, + bulkDeleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Bulk delete SIMs from a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param options The options parameters. + */ + async beginBulkDeleteAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimDeleteList, + options?: SimsBulkDeleteOptionalParams + ): Promise { + const poller = await this.beginBulkDelete( + resourceGroupName, + simGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param options The options parameters. + */ + async beginBulkUploadEncrypted( + resourceGroupName: string, + simGroupName: string, + parameters: EncryptedSimUploadList, + options?: SimsBulkUploadEncryptedOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimsBulkUploadEncryptedResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, simGroupName, parameters, options }, + bulkUploadEncryptedOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param options The options parameters. + */ + async beginBulkUploadEncryptedAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: EncryptedSimUploadList, + options?: SimsBulkUploadEncryptedOptionalParams + ): Promise { + const poller = await this.beginBulkUploadEncrypted( + resourceGroupName, + simGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** * ListByGroupNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -472,6 +760,105 @@ const listByGroupOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const bulkUploadOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const bulkDeleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const bulkUploadEncryptedOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listByGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts index b5fbea4bf05f..7fa4a6da8f4f 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts @@ -11,12 +11,10 @@ export * from "./dataNetworks"; export * from "./mobileNetworks"; export * from "./operations"; export * from "./packetCoreControlPlanes"; -export * from "./packetCoreControlPlaneOperations"; export * from "./packetCoreControlPlaneVersions"; export * from "./packetCoreDataPlanes"; export * from "./services"; export * from "./sims"; -export * from "./simOperations"; export * from "./simGroups"; export * from "./simPolicies"; export * from "./sites"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneOperations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneOperations.ts deleted file mode 100644 index 8990008c94ed..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneOperations.ts +++ /dev/null @@ -1,117 +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. - */ - -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - PacketCoreControlPlaneRollbackOptionalParams, - PacketCoreControlPlaneRollbackResponse, - PacketCoreControlPlaneReinstallOptionalParams, - PacketCoreControlPlaneReinstallResponse, - PacketCoreControlPlaneCollectDiagnosticsPackage, - PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams, - PacketCoreControlPlaneCollectDiagnosticsPackageResponse -} from "../models"; - -/** Interface representing a PacketCoreControlPlaneOperations. */ -export interface PacketCoreControlPlaneOperations { - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param options The options parameters. - */ - beginRollback( - resourceGroupName: string, - packetCoreControlPlaneName: string, - options?: PacketCoreControlPlaneRollbackOptionalParams - ): Promise< - PollerLike< - PollOperationState, - PacketCoreControlPlaneRollbackResponse - > - >; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param options The options parameters. - */ - beginRollbackAndWait( - resourceGroupName: string, - packetCoreControlPlaneName: string, - options?: PacketCoreControlPlaneRollbackOptionalParams - ): Promise; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param options The options parameters. - */ - beginReinstall( - resourceGroupName: string, - packetCoreControlPlaneName: string, - options?: PacketCoreControlPlaneReinstallOptionalParams - ): Promise< - PollerLike< - PollOperationState, - PacketCoreControlPlaneReinstallResponse - > - >; - /** - * 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. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param options The options parameters. - */ - beginReinstallAndWait( - resourceGroupName: string, - packetCoreControlPlaneName: string, - options?: PacketCoreControlPlaneReinstallOptionalParams - ): Promise; - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload - * the diagnostics to a storage account. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package - * operation. - * @param options The options parameters. - */ - beginCollectDiagnosticsPackage( - resourceGroupName: string, - packetCoreControlPlaneName: string, - parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, - options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams - ): Promise< - PollerLike< - PollOperationState< - PacketCoreControlPlaneCollectDiagnosticsPackageResponse - >, - PacketCoreControlPlaneCollectDiagnosticsPackageResponse - > - >; - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload - * the diagnostics to a storage account. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package - * operation. - * @param options The options parameters. - */ - beginCollectDiagnosticsPackageAndWait( - resourceGroupName: string, - packetCoreControlPlaneName: string, - parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, - options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams - ): Promise; -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts index ddc209e4fc8a..ac1083089d75 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts @@ -19,7 +19,14 @@ import { PacketCoreControlPlanesCreateOrUpdateResponse, TagsObject, PacketCoreControlPlanesUpdateTagsOptionalParams, - PacketCoreControlPlanesUpdateTagsResponse + PacketCoreControlPlanesUpdateTagsResponse, + PacketCoreControlPlanesRollbackOptionalParams, + PacketCoreControlPlanesRollbackResponse, + PacketCoreControlPlanesReinstallOptionalParams, + PacketCoreControlPlanesReinstallResponse, + PacketCoreControlPlaneCollectDiagnosticsPackage, + PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams, + PacketCoreControlPlanesCollectDiagnosticsPackageResponse } from "../models"; /// @@ -118,4 +125,99 @@ export interface PacketCoreControlPlanes { parameters: TagsObject, options?: PacketCoreControlPlanesUpdateTagsOptionalParams ): Promise; + /** + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + beginRollback( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlanesRollbackOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PacketCoreControlPlanesRollbackResponse + > + >; + /** + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + beginRollbackAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlanesRollbackOptionalParams + ): Promise; + /** + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + beginReinstall( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlanesReinstallOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PacketCoreControlPlanesReinstallResponse + > + >; + /** + * 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + beginReinstallAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlanesReinstallOptionalParams + ): Promise; + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload + * the diagnostics to a storage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package + * operation. + * @param options The options parameters. + */ + beginCollectDiagnosticsPackage( + resourceGroupName: string, + packetCoreControlPlaneName: string, + parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, + options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PacketCoreControlPlanesCollectDiagnosticsPackageResponse + >, + PacketCoreControlPlanesCollectDiagnosticsPackageResponse + > + >; + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload + * the diagnostics to a storage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package + * operation. + * @param options The options parameters. + */ + beginCollectDiagnosticsPackageAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, + options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams + ): Promise; } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simOperations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simOperations.ts deleted file mode 100644 index 7e2573a21d48..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simOperations.ts +++ /dev/null @@ -1,111 +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. - */ - -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - SimUploadList, - SimBulkUploadOptionalParams, - SimBulkUploadResponse, - SimDeleteList, - SimBulkDeleteOptionalParams, - SimBulkDeleteResponse, - EncryptedSimUploadList, - SimBulkUploadEncryptedOptionalParams, - SimBulkUploadEncryptedResponse -} from "../models"; - -/** Interface representing a SimOperations. */ -export interface SimOperations { - /** - * Bulk upload SIMs to a SIM group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param options The options parameters. - */ - beginBulkUpload( - resourceGroupName: string, - simGroupName: string, - parameters: SimUploadList, - options?: SimBulkUploadOptionalParams - ): Promise< - PollerLike, SimBulkUploadResponse> - >; - /** - * Bulk upload SIMs to a SIM group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param options The options parameters. - */ - beginBulkUploadAndWait( - resourceGroupName: string, - simGroupName: string, - parameters: SimUploadList, - options?: SimBulkUploadOptionalParams - ): Promise; - /** - * Bulk delete SIMs from a SIM group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param options The options parameters. - */ - beginBulkDelete( - resourceGroupName: string, - simGroupName: string, - parameters: SimDeleteList, - options?: SimBulkDeleteOptionalParams - ): Promise< - PollerLike, SimBulkDeleteResponse> - >; - /** - * Bulk delete SIMs from a SIM group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param options The options parameters. - */ - beginBulkDeleteAndWait( - resourceGroupName: string, - simGroupName: string, - parameters: SimDeleteList, - options?: SimBulkDeleteOptionalParams - ): Promise; - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param options The options parameters. - */ - beginBulkUploadEncrypted( - resourceGroupName: string, - simGroupName: string, - parameters: EncryptedSimUploadList, - options?: SimBulkUploadEncryptedOptionalParams - ): Promise< - PollerLike< - PollOperationState, - SimBulkUploadEncryptedResponse - > - >; - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param options The options parameters. - */ - beginBulkUploadEncryptedAndWait( - resourceGroupName: string, - simGroupName: string, - parameters: EncryptedSimUploadList, - options?: SimBulkUploadEncryptedOptionalParams - ): Promise; -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts index a6e6e35763d7..477d37cf39d3 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts @@ -15,7 +15,16 @@ import { SimsGetOptionalParams, SimsGetResponse, SimsCreateOrUpdateOptionalParams, - SimsCreateOrUpdateResponse + SimsCreateOrUpdateResponse, + SimUploadList, + SimsBulkUploadOptionalParams, + SimsBulkUploadResponse, + SimDeleteList, + SimsBulkDeleteOptionalParams, + SimsBulkDeleteResponse, + EncryptedSimUploadList, + SimsBulkUploadEncryptedOptionalParams, + SimsBulkUploadEncryptedResponse } from "../models"; /// @@ -106,4 +115,97 @@ export interface Sims { parameters: Sim, options?: SimsCreateOrUpdateOptionalParams ): Promise; + /** + * Bulk upload SIMs to a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param options The options parameters. + */ + beginBulkUpload( + resourceGroupName: string, + simGroupName: string, + parameters: SimUploadList, + options?: SimsBulkUploadOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimsBulkUploadResponse + > + >; + /** + * Bulk upload SIMs to a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param options The options parameters. + */ + beginBulkUploadAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimUploadList, + options?: SimsBulkUploadOptionalParams + ): Promise; + /** + * Bulk delete SIMs from a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param options The options parameters. + */ + beginBulkDelete( + resourceGroupName: string, + simGroupName: string, + parameters: SimDeleteList, + options?: SimsBulkDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimsBulkDeleteResponse + > + >; + /** + * Bulk delete SIMs from a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param options The options parameters. + */ + beginBulkDeleteAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimDeleteList, + options?: SimsBulkDeleteOptionalParams + ): Promise; + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param options The options parameters. + */ + beginBulkUploadEncrypted( + resourceGroupName: string, + simGroupName: string, + parameters: EncryptedSimUploadList, + options?: SimsBulkUploadEncryptedOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimsBulkUploadEncryptedResponse + > + >; + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param options The options parameters. + */ + beginBulkUploadEncryptedAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: EncryptedSimUploadList, + options?: SimsBulkUploadEncryptedOptionalParams + ): Promise; } 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"