diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7e571d240b06..9875de58369a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4695,7 +4695,7 @@ packages: dependencies: semver: 7.5.1 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230623 + typescript: 5.2.0-dev.20230624 dev: false /duplexer3/0.1.5: @@ -10149,8 +10149,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230623: - resolution: {integrity: sha512-IduDyLpZBJFdoFuHAXj0QfHwkT6GXtkki03deolpXnPG4R+wiVZGIyyzdS0lfVbFCVejcINPxxBs7ce6E5mp+A==} + /typescript/5.2.0-dev.20230624: + resolution: {integrity: sha512-n/E1V9TddYiQdoaPXXt7yWU214+n0pGWk82auTMaAkOAj4HJy+TLtaeNt4QjDhMLiF2yFCjVma8qNgD24X6VxQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -14777,7 +14777,7 @@ packages: dev: false file:projects/arm-mobilenetwork.tgz: - resolution: {integrity: sha512-cRVhEdtT4Qur940fMRA1QYOlDsdM8NGQCDzibjlfL5D1zVbZ7iiup9z7EZ5Bt3YHaUr5cNsaQapyJfChRxeMYQ==, tarball: file:projects/arm-mobilenetwork.tgz} + resolution: {integrity: sha512-y5agWbhlFgWc70Dtmboxah1b5+DReFXjJ7qgjoLV3IeI7IZ8LqyqgNjdgX1ml1o9YsZ4UHl1R59lybmOFkN85w==, tarball: file:projects/arm-mobilenetwork.tgz} name: '@rush-temp/arm-mobilenetwork' version: 0.0.0 dependencies: @@ -14792,7 +14792,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - mkdirp: 1.0.4 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -17923,7 +17923,7 @@ packages: dev: false file:projects/confidential-ledger.tgz: - resolution: {integrity: sha512-PFGdQJmKd/QIjnd0o3Yn9afHedMAGR/QPrL0HYCL/SvYVppbLhNmfiuCh3jAD0Pa7hz1M+JzTERWStBWCzQ2gg==, tarball: file:projects/confidential-ledger.tgz} + resolution: {integrity: sha512-cxXcoP19Ey/WDN+gBSbUX3c4qEjxEUb6xCNwYTPweJiPZyNoVpDzkkix60JgoGdj1A61jeMzvp5j7RhDXunoXg==, tarball: file:projects/confidential-ledger.tgz} name: '@rush-temp/confidential-ledger' version: 0.0.0 dependencies: @@ -17959,11 +17959,7 @@ packages: tslib: 2.5.2 typescript: 5.0.4 transitivePeerDependencies: - - bufferutil - - debug - - encoding - supports-color - - utf-8-validate dev: false file:projects/container-registry.tgz: diff --git a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md index d5b076f7adbf..6c557d9b7b7b 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md @@ -1,15 +1,79 @@ # Release History + +## 3.0.0 (2023-06-25) + +**Features** -## 2.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group DiagnosticsPackages + - Added operation group PacketCaptures + - Added operation PacketCoreControlPlaneVersions.getBySubscription + - Added operation PacketCoreControlPlaneVersions.listBySubscription + - Added operation Sites.beginDeletePacketCore + - Added operation Sites.beginDeletePacketCoreAndWait + - Added Interface DiagnosticsPackage + - Added Interface DiagnosticsPackageListResult + - Added Interface DiagnosticsPackagesCreateOrUpdateOptionalParams + - Added Interface DiagnosticsPackagesDeleteOptionalParams + - Added Interface DiagnosticsPackagesGetOptionalParams + - Added Interface DiagnosticsPackagesListByPacketCoreControlPlaneNextOptionalParams + - Added Interface DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams + - Added Interface DiagnosticsUploadConfiguration + - Added Interface IdentityAndTagsObject + - Added Interface PacketCapture + - Added Interface PacketCaptureListResult + - Added Interface PacketCapturesCreateOrUpdateOptionalParams + - Added Interface PacketCapturesDeleteOptionalParams + - Added Interface PacketCapturesGetOptionalParams + - Added Interface PacketCapturesListByPacketCoreControlPlaneNextOptionalParams + - Added Interface PacketCapturesListByPacketCoreControlPlaneOptionalParams + - Added Interface PacketCapturesStopOptionalParams + - Added Interface PacketCoreControlPlaneResourceId + - Added Interface PacketCoreControlPlaneVersionsGetBySubscriptionOptionalParams + - Added Interface PacketCoreControlPlaneVersionsListBySubscriptionNextOptionalParams + - Added Interface PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams + - Added Interface SiteDeletePacketCore + - Added Interface SitesDeletePacketCoreOptionalParams + - Added Type Alias DesiredInstallationState + - Added Type Alias DiagnosticsPackagesCreateOrUpdateResponse + - Added Type Alias DiagnosticsPackagesGetResponse + - Added Type Alias DiagnosticsPackagesListByPacketCoreControlPlaneNextResponse + - Added Type Alias DiagnosticsPackagesListByPacketCoreControlPlaneResponse + - Added Type Alias DiagnosticsPackageStatus + - Added Type Alias InstallationReason + - Added Type Alias PacketCapturesCreateOrUpdateResponse + - Added Type Alias PacketCapturesGetResponse + - Added Type Alias PacketCapturesListByPacketCoreControlPlaneNextResponse + - Added Type Alias PacketCapturesListByPacketCoreControlPlaneResponse + - Added Type Alias PacketCapturesStopResponse + - Added Type Alias PacketCaptureStatus + - Added Type Alias PacketCoreControlPlaneVersionsGetBySubscriptionResponse + - Added Type Alias PacketCoreControlPlaneVersionsListBySubscriptionNextResponse + - Added Type Alias PacketCoreControlPlaneVersionsListBySubscriptionResponse + - Added Type Alias ReinstallRequired + - Interface Installation has a new optional parameter desiredState + - Interface Installation has a new optional parameter reasons + - Interface Installation has a new optional parameter reinstallRequired + - Interface PacketCoreControlPlane has a new optional parameter diagnosticsUpload + - Interface PacketCoreControlPlane has a new optional parameter installedVersion + - Added Enum KnownDesiredInstallationState + - Added Enum KnownDiagnosticsPackageStatus + - Added Enum KnownInstallationReason + - Added Enum KnownPacketCaptureStatus + - Added Enum KnownReinstallRequired -### Other Changes +**Breaking Changes** + - Operation PacketCoreControlPlanes.updateTags has a new signature + - Operation SimGroups.updateTags has a new signature + - Class MobileNetworkManagementClient has a new signature + - Interface ManagedServiceIdentity no longer has parameter principalId + - Interface ManagedServiceIdentity no longer has parameter tenantId + - Enum KnownBillingSku no longer has value G3 + - Enum KnownBillingSku no longer has value G4 + - Enum KnownManagedServiceIdentityType no longer has value SystemAssigned + - Enum KnownManagedServiceIdentityType no longer has value SystemAssignedUserAssigned + + ## 2.0.0 (2023-01-06) **Features** diff --git a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json index cfb800cbf00c..f416276df1b9 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json @@ -1,8 +1,8 @@ { - "commit": "340d577969b7bff5ad0488d79543314bc17daa50", + "commit": "cec40fac54da9dd9def342d2a0c2da0bf4b530f0", "readme": "specification/mobilenetwork/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mobilenetwork\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.6.20221226.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/mobilenetwork/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.6.20221226.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/assets.json b/sdk/mobilenetwork/arm-mobilenetwork/assets.json deleted file mode 100644 index 81cb21173d4b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/mobilenetwork/arm-mobilenetwork", - "Tag": "js/mobilenetwork/arm-mobilenetwork_e1fea11bad" -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/package.json b/sdk/mobilenetwork/arm-mobilenetwork/package.json index 797a1d925298..3db03c3c8adb 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/package.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MobileNetworkManagementClient.", - "version": "2.0.1", + "version": "3.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.3", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,7 +33,7 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork" +} \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md index da51762ebea2..06954a104390 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export interface Ambr { @@ -64,9 +64,9 @@ export interface AttachedDataNetworkResourceId { // @public export interface AttachedDataNetworks { - beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams): Promise, AttachedDataNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams): Promise, AttachedDataNetworksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams): Promise; get(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksGetOptionalParams): Promise; listByPacketCoreDataPlane(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: AttachedDataNetworksListByPacketCoreDataPlaneOptionalParams): PagedAsyncIterableIterator; @@ -163,7 +163,7 @@ export interface ConnectedClusterResourceId { } // @public -export type CoreNetworkType = "5GC" | "EPC"; +export type CoreNetworkType = "5GC" | "EPC" | "EPC + 5GC"; // @public export type CreatedByType = string; @@ -206,9 +206,9 @@ export interface DataNetworkResourceId { // @public export interface DataNetworks { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams): Promise, DataNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams): Promise, DataNetworksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: DataNetworksListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; @@ -258,6 +258,76 @@ export interface DataNetworksUpdateTagsOptionalParams extends coreClient.Operati // @public export type DataNetworksUpdateTagsResponse = DataNetwork; +// @public +export type DesiredInstallationState = string; + +// @public +export interface DiagnosticsPackage extends ProxyResource { + readonly provisioningState?: ProvisioningState; + readonly reason?: string; + readonly status?: DiagnosticsPackageStatus; +} + +// @public +export interface DiagnosticsPackageListResult { + readonly nextLink?: string; + value?: DiagnosticsPackage[]; +} + +// @public +export interface DiagnosticsPackages { + beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, diagnosticsPackageName: string, options?: DiagnosticsPackagesCreateOrUpdateOptionalParams): Promise, DiagnosticsPackagesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, diagnosticsPackageName: string, options?: DiagnosticsPackagesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, diagnosticsPackageName: string, options?: DiagnosticsPackagesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, diagnosticsPackageName: string, options?: DiagnosticsPackagesDeleteOptionalParams): Promise; + get(resourceGroupName: string, packetCoreControlPlaneName: string, diagnosticsPackageName: string, options?: DiagnosticsPackagesGetOptionalParams): Promise; + listByPacketCoreControlPlane(resourceGroupName: string, packetCoreControlPlaneName: string, options?: DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DiagnosticsPackagesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiagnosticsPackagesCreateOrUpdateResponse = DiagnosticsPackage; + +// @public +export interface DiagnosticsPackagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DiagnosticsPackagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiagnosticsPackagesGetResponse = DiagnosticsPackage; + +// @public +export interface DiagnosticsPackagesListByPacketCoreControlPlaneNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiagnosticsPackagesListByPacketCoreControlPlaneNextResponse = DiagnosticsPackageListResult; + +// @public +export interface DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiagnosticsPackagesListByPacketCoreControlPlaneResponse = DiagnosticsPackageListResult; + +// @public +export type DiagnosticsPackageStatus = string; + +// @public +export interface DiagnosticsUploadConfiguration { + storageAccountContainerUrl: string; +} + // @public export interface EncryptedSimPropertiesFormat extends CommonSimPropertiesFormat { encryptedCredentials?: string; @@ -302,12 +372,26 @@ export interface HttpsServerCertificate { readonly provisioning?: CertificateProvisioning; } +// @public +export interface IdentityAndTagsObject { + identity?: ManagedServiceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + // @public export interface Installation { - operation?: AsyncOperationId; - state?: InstallationState; + desiredState?: DesiredInstallationState; + readonly operation?: AsyncOperationId; + readonly reasons?: InstallationReason[]; + readonly reinstallRequired?: ReinstallRequired; + readonly state?: InstallationState; } +// @public +export type InstallationReason = string; + // @public export type InstallationState = string; @@ -336,8 +420,6 @@ export enum KnownBillingSku { G1 = "G1", G10 = "G10", G2 = "G2", - G3 = "G3", - G4 = "G4", G5 = "G5" } @@ -356,6 +438,27 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDesiredInstallationState { + Installed = "Installed", + Uninstalled = "Uninstalled" +} + +// @public +export enum KnownDiagnosticsPackageStatus { + Collected = "Collected", + Collecting = "Collecting", + Error = "Error", + NotStarted = "NotStarted" +} + +// @public +export enum KnownInstallationReason { + NoAttachedDataNetworks = "NoAttachedDataNetworks", + NoPacketCoreDataPlane = "NoPacketCoreDataPlane", + NoSlices = "NoSlices" +} + // @public export enum KnownInstallationState { Failed = "Failed", @@ -372,8 +475,6 @@ export enum KnownInstallationState { // @public export enum KnownManagedServiceIdentityType { None = "None", - SystemAssigned = "SystemAssigned", - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", UserAssigned = "UserAssigned" } @@ -389,6 +490,14 @@ export enum KnownObsoleteVersion { Obsolete = "Obsolete" } +// @public +export enum KnownPacketCaptureStatus { + Error = "Error", + NotStarted = "NotStarted", + Running = "Running", + Stopped = "Stopped" +} + // @public export enum KnownPduSessionType { IPv4 = "IPv4", @@ -430,6 +539,12 @@ export enum KnownRecommendedVersion { Recommended = "Recommended" } +// @public +export enum KnownReinstallRequired { + NotRequired = "NotRequired", + Required = "Required" +} + // @public export enum KnownSdfDirection { Bidirectional = "Bidirectional", @@ -478,8 +593,6 @@ export interface LocalDiagnosticsAccessConfiguration { // @public export interface ManagedServiceIdentity { - readonly principalId?: string; - readonly tenantId?: string; type: ManagedServiceIdentityType; userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity; @@ -507,6 +620,7 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MobileNetworkManagementClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: MobileNetworkManagementClientOptionalParams); // (undocumented) apiVersion: string; // (undocumented) @@ -514,10 +628,14 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // (undocumented) dataNetworks: DataNetworks; // (undocumented) + diagnosticsPackages: DiagnosticsPackages; + // (undocumented) mobileNetworks: MobileNetworks; // (undocumented) operations: Operations; // (undocumented) + packetCaptures: PacketCaptures; + // (undocumented) packetCoreControlPlanes: PacketCoreControlPlanes; // (undocumented) packetCoreControlPlaneVersions: PacketCoreControlPlaneVersions; @@ -536,7 +654,7 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // (undocumented) slices: Slices; // (undocumented) - subscriptionId: string; + subscriptionId?: string; } // @public @@ -553,9 +671,9 @@ export interface MobileNetworkResourceId { // @public export interface MobileNetworks { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams): Promise, MobileNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams): Promise, MobileNetworksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: MobileNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -675,12 +793,92 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = OperationList; +// @public +export interface PacketCapture extends ProxyResource { + bytesToCapturePerPacket?: number; + readonly captureStartTime?: Date; + networkInterfaces?: string[]; + readonly provisioningState?: ProvisioningState; + readonly reason?: string; + readonly status?: PacketCaptureStatus; + timeLimitInSeconds?: number; + totalBytesPerSession?: number; +} + +// @public +export interface PacketCaptureListResult { + readonly nextLink?: string; + value?: PacketCapture[]; +} + +// @public +export interface PacketCaptures { + beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCaptureName: string, parameters: PacketCapture, options?: PacketCapturesCreateOrUpdateOptionalParams): Promise, PacketCapturesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCaptureName: string, parameters: PacketCapture, options?: PacketCapturesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCaptureName: string, options?: PacketCapturesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCaptureName: string, options?: PacketCapturesDeleteOptionalParams): Promise; + beginStop(resourceGroupName: string, packetCoreControlPlaneName: string, packetCaptureName: string, options?: PacketCapturesStopOptionalParams): Promise, PacketCapturesStopResponse>>; + beginStopAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCaptureName: string, options?: PacketCapturesStopOptionalParams): Promise; + get(resourceGroupName: string, packetCoreControlPlaneName: string, packetCaptureName: string, options?: PacketCapturesGetOptionalParams): Promise; + listByPacketCoreControlPlane(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCapturesListByPacketCoreControlPlaneOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PacketCapturesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PacketCapturesCreateOrUpdateResponse = PacketCapture; + +// @public +export interface PacketCapturesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PacketCapturesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PacketCapturesGetResponse = PacketCapture; + +// @public +export interface PacketCapturesListByPacketCoreControlPlaneNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PacketCapturesListByPacketCoreControlPlaneNextResponse = PacketCaptureListResult; + +// @public +export interface PacketCapturesListByPacketCoreControlPlaneOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PacketCapturesListByPacketCoreControlPlaneResponse = PacketCaptureListResult; + +// @public +export interface PacketCapturesStopOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PacketCapturesStopResponse = AsyncOperationStatus; + +// @public +export type PacketCaptureStatus = string; + // @public export interface PacketCoreControlPlane extends TrackedResource { controlPlaneAccessInterface: InterfaceProperties; coreNetworkTechnology?: CoreNetworkType; + diagnosticsUpload?: DiagnosticsUploadConfiguration; identity?: ManagedServiceIdentity; - readonly installation?: Installation; + installation?: Installation; + readonly installedVersion?: string; interopSettings?: Record; localDiagnosticsAccess: LocalDiagnosticsAccessConfiguration; platform: PlatformConfiguration; @@ -703,22 +901,27 @@ export interface PacketCoreControlPlaneListResult { value?: PacketCoreControlPlane[]; } +// @public +export interface PacketCoreControlPlaneResourceId { + id: string; +} + // @public export interface PacketCoreControlPlanes { - beginCollectDiagnosticsPackage(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams): Promise, PacketCoreControlPlanesCollectDiagnosticsPackageResponse>>; + beginCollectDiagnosticsPackage(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams): Promise, PacketCoreControlPlanesCollectDiagnosticsPackageResponse>>; beginCollectDiagnosticsPackageAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreControlPlanesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreControlPlanesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams): Promise; - beginReinstall(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams): Promise, PacketCoreControlPlanesReinstallResponse>>; + beginReinstall(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams): Promise, PacketCoreControlPlanesReinstallResponse>>; beginReinstallAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams): Promise; - beginRollback(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams): Promise, PacketCoreControlPlanesRollbackResponse>>; + beginRollback(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams): Promise, PacketCoreControlPlanesRollbackResponse>>; beginRollbackAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams): Promise; get(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: PacketCoreControlPlanesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: PacketCoreControlPlanesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: TagsObject, options?: PacketCoreControlPlanesUpdateTagsOptionalParams): Promise; + updateTags(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: IdentityAndTagsObject, options?: PacketCoreControlPlanesUpdateTagsOptionalParams): Promise; } // @public @@ -820,9 +1023,18 @@ export interface PacketCoreControlPlaneVersionListResult { // @public export interface PacketCoreControlPlaneVersions { get(versionName: string, options?: PacketCoreControlPlaneVersionsGetOptionalParams): Promise; + getBySubscription(versionName: string, options?: PacketCoreControlPlaneVersionsGetBySubscriptionOptionalParams): Promise; list(options?: PacketCoreControlPlaneVersionsListOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PacketCoreControlPlaneVersionsGetBySubscriptionOptionalParams extends coreClient.OperationOptions { } +// @public +export type PacketCoreControlPlaneVersionsGetBySubscriptionResponse = PacketCoreControlPlaneVersion; + // @public export interface PacketCoreControlPlaneVersionsGetOptionalParams extends coreClient.OperationOptions { } @@ -830,6 +1042,20 @@ export interface PacketCoreControlPlaneVersionsGetOptionalParams extends coreCli // @public export type PacketCoreControlPlaneVersionsGetResponse = PacketCoreControlPlaneVersion; +// @public +export interface PacketCoreControlPlaneVersionsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PacketCoreControlPlaneVersionsListBySubscriptionNextResponse = PacketCoreControlPlaneVersionListResult; + +// @public +export interface PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PacketCoreControlPlaneVersionsListBySubscriptionResponse = PacketCoreControlPlaneVersionListResult; + // @public export interface PacketCoreControlPlaneVersionsListNextOptionalParams extends coreClient.OperationOptions { } @@ -858,9 +1084,9 @@ export interface PacketCoreDataPlaneListResult { // @public export interface PacketCoreDataPlanes { - beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreDataPlanesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreDataPlanesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams): Promise; get(resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesGetOptionalParams): Promise; listByPacketCoreControlPlane(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreDataPlanesListByPacketCoreControlPlaneOptionalParams): PagedAsyncIterableIterator; @@ -1000,6 +1226,9 @@ export interface QosPolicy { // @public export type RecommendedVersion = string; +// @public +export type ReinstallRequired = string; + // @public export interface Resource { readonly id?: string; @@ -1041,9 +1270,9 @@ export interface ServiceResourceId { // @public export interface Services { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, serviceName: string, parameters: Service, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, serviceName: string, parameters: Service, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, serviceName: string, parameters: Service, options?: ServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, serviceName: string, options?: ServicesGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: ServicesListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; @@ -1137,14 +1366,14 @@ export interface SimGroupResourceId { // @public export interface SimGroups { - beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams): Promise, SimGroupsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams): Promise, SimGroupsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, simGroupName: string, parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams): Promise; get(resourceGroupName: string, simGroupName: string, options?: SimGroupsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: SimGroupsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: SimGroupsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, simGroupName: string, parameters: TagsObject, options?: SimGroupsUpdateTagsOptionalParams): Promise; + updateTags(resourceGroupName: string, simGroupName: string, parameters: IdentityAndTagsObject, options?: SimGroupsUpdateTagsOptionalParams): Promise; } // @public @@ -1249,9 +1478,9 @@ export interface SimNameAndProperties { // @public export interface SimPolicies { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams): Promise, SimPoliciesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams): Promise, SimPoliciesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: SimPoliciesListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; @@ -1333,15 +1562,15 @@ export interface SimPropertiesFormat extends CommonSimPropertiesFormat { // @public export interface Sims { - beginBulkDelete(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams): Promise, SimsBulkDeleteResponse>>; + beginBulkDelete(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams): Promise, SimsBulkDeleteResponse>>; beginBulkDeleteAndWait(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams): Promise; - beginBulkUpload(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimsBulkUploadOptionalParams): Promise, SimsBulkUploadResponse>>; + beginBulkUpload(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimsBulkUploadOptionalParams): Promise, SimsBulkUploadResponse>>; beginBulkUploadAndWait(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimsBulkUploadOptionalParams): Promise; - beginBulkUploadEncrypted(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams): Promise, SimsBulkUploadEncryptedResponse>>; + beginBulkUploadEncrypted(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams): Promise, SimsBulkUploadEncryptedResponse>>; beginBulkUploadEncryptedAndWait(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise, SimsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise, SimsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise; get(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsGetOptionalParams): Promise; listByGroup(resourceGroupName: string, simGroupName: string, options?: SimsListByGroupOptionalParams): PagedAsyncIterableIterator; @@ -1436,6 +1665,11 @@ export interface Site extends TrackedResource { readonly provisioningState?: ProvisioningState; } +// @public +export interface SiteDeletePacketCore { + packetCore?: PacketCoreControlPlaneResourceId; +} + // @public export interface SiteListResult { readonly nextLink?: string; @@ -1452,10 +1686,12 @@ export interface SiteResourceId { // @public export interface Sites { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: Site, options?: SitesCreateOrUpdateOptionalParams): Promise, SitesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: Site, options?: SitesCreateOrUpdateOptionalParams): Promise, SitesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: Site, options?: SitesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams): Promise; + beginDeletePacketCore(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: SiteDeletePacketCore, options?: SitesDeletePacketCoreOptionalParams): Promise, void>>; + beginDeletePacketCoreAndWait(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: SiteDeletePacketCore, options?: SitesDeletePacketCoreOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, siteName: string, options?: SitesGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: SitesListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; updateTags(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: TagsObject, options?: SitesUpdateTagsOptionalParams): Promise; @@ -1476,6 +1712,12 @@ export interface SitesDeleteOptionalParams extends coreClient.OperationOptions { updateIntervalInMs?: number; } +// @public +export interface SitesDeletePacketCoreOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface SitesGetOptionalParams extends coreClient.OperationOptions { } @@ -1531,9 +1773,9 @@ export interface SliceResourceId { // @public export interface Slices { - beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, sliceName: string, parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams): Promise, SlicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, sliceName: string, parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams): Promise, SlicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, sliceName: string, parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, sliceName: string, options?: SlicesGetOptionalParams): Promise; listByMobileNetwork(resourceGroupName: string, mobileNetworkName: string, options?: SlicesListByMobileNetworkOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 791c63bdec48..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AttachedDataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * - * @summary Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters: AttachedDataNetwork = { - dnsAddresses: ["1.1.1.1"], - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 30, tcp: 180, udp: 30 }, - portRange: { maxPort: 49999, minPort: 1024 }, - portReuseHoldTime: { tcp: 120, udp: 60 } - }, - userEquipmentAddressPoolPrefix: ["2.2.0.0/16"], - userEquipmentStaticAddressPoolPrefix: ["2.4.0.0/16"], - userPlaneDataInterface: { name: "N6" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksDeleteSample.ts deleted file mode 100644 index e30cf94458c7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified attached data network. - * - * @summary Deletes the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - deleteAttachedDataNetworkResource(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksGetSample.ts deleted file mode 100644 index b6badff4dcb2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksGetSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified attached data network. - * - * @summary Gets information about the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - getAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksListByPacketCoreDataPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksListByPacketCoreDataPlaneSample.ts deleted file mode 100644 index 744af2341db7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksListByPacketCoreDataPlaneSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the attached data networks associated with a packet core data plane. - * - * @summary Gets all the attached data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.attachedDataNetworks.listByPacketCoreDataPlane( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAttachedDataNetworksInADataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksUpdateTagsSample.ts deleted file mode 100644 index e3b12165d513..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an attached data network tags. - * - * @summary Updates an attached data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateAttachedDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 983eb31c63e4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a data network. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a data network. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters: DataNetwork = { - description: "myFavouriteDataNetwork", - location: "eastus" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksDeleteSample.ts deleted file mode 100644 index c37d17fb818b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified data network. - * - * @summary Deletes the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - deleteDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksGetSample.ts deleted file mode 100644 index c305a7fae7b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified data network. - * - * @summary Gets information about the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.get( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - getDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksListByMobileNetworkSample.ts deleted file mode 100644 index f558493bee5d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data networks in the mobile network. - * - * @summary Lists all data networks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataNetworks.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataNetworksInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksUpdateTagsSample.ts deleted file mode 100644 index 4b6edda19847..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 7ba80547b2ae..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MobileNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network. - * - * @summary Creates or updates a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters: MobileNetwork = { - location: "eastus", - publicLandMobileNetworkIdentifier: { mcc: "001", mnc: "01" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksDeleteSample.ts deleted file mode 100644 index 2e35d2a808a2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network. - * - * @summary Deletes the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - deleteMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksGetSample.ts deleted file mode 100644 index f8bb34b1370f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network. - * - * @summary Gets information about the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.get( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - getMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListByResourceGroupSample.ts deleted file mode 100644 index 348fc0ea2d4c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a resource group. - * - * @summary Lists all the mobile networks in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListBySubscriptionSample.ts deleted file mode 100644 index e91d8627cc38..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a subscription. - * - * @summary Lists all the mobile networks in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksUpdateTagsSample.ts deleted file mode 100644 index d86c8fe08f93..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/operationsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/operationsListSample.ts deleted file mode 100644 index 7d825d29dfc5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of the operations. - * - * @summary Gets a list of the operations. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getRegistrationOperations(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsGetSample.ts deleted file mode 100644 index 1ce3132540dc..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane version. - * - * @summary Gets information about the specified packet core control plane version. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const versionName = "PMN-4-11-1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlaneVersions.get(versionName); - console.log(result); -} - -async function main() { - getPacketCoreControlPlaneVersion(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListSample.ts deleted file mode 100644 index 63dad3ce3740..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all supported packet core control planes versions. - * - * @summary Lists all supported packet core control planes versions. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlaneVersions.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getSupportedPacketCoreControlPlaneVersions(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts deleted file mode 100644 index 8e131575a9d9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlaneCollectDiagnosticsPackage, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * - * @summary Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json - */ -async function collectDiagnosticsPackageFromPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlaneCollectDiagnosticsPackage = { - storageAccountBlobUrl: - "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.ts deleted file mode 100644 index 94ba54de44c9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a packet core control plane. - * - * @summary Creates or updates a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlane = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - authenticationType: "AAD", - httpsServerCertificate: { - certificateUrl: - "https://contosovault.vault.azure.net/certificates/ingress" - } - }, - location: "eastus", - platform: { - type: "AKS-HCI", - azureStackEdgeDevice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice" - }, - connectedCluster: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster" - }, - customLocation: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation" - } - }, - sites: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite" - } - ], - sku: "G0", - ueMtu: 1600, - version: "0.2.0" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesDeleteSample.ts deleted file mode 100644 index 49f71c97173d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified packet core control plane. - * - * @summary Deletes the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesGetSample.ts deleted file mode 100644 index 3ea686ce575a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane. - * - * @summary Gets information about the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.get( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListByResourceGroupSample.ts deleted file mode 100644 index e90c72ed77b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a resource group. - * - * @summary Lists all the packet core control planes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListBySubscriptionSample.ts deleted file mode 100644 index fb15bca1e86c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a subscription. - * - * @summary Lists all the packet core control planes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesReinstallSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesReinstallSample.ts deleted file mode 100644 index 53c444c08243..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesReinstallSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * - * @summary Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json - */ -async function reinstallPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesRollbackSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesRollbackSample.ts deleted file mode 100644 index e5cc4c226ddd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesRollbackSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * - * @summary Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json - */ -async function rollbackPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesUpdateTagsSample.ts deleted file mode 100644 index f39687caf496..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates packet core control planes tags. - * - * @summary Updates packet core control planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreControlPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesCreateOrUpdateSample.ts deleted file mode 100644 index edd571d456d6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreDataPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * - * @summary Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters: PacketCoreDataPlane = { - location: "eastus", - userPlaneAccessInterface: { name: "N3" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesDeleteSample.ts deleted file mode 100644 index 2a2549793ced..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified packet core data plane. - * - * @summary Deletes the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesGetSample.ts deleted file mode 100644 index d11c47f32dd7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core data plane. - * - * @summary Gets information about the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts deleted file mode 100644 index 241fc5e80d5a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core data planes associated with a packet core control plane. - * - * @summary Lists all the packet core data planes associated with a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreDataPlanes.listByPacketCoreControlPlane( - resourceGroupName, - packetCoreControlPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreDataPlanesInAControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesUpdateTagsSample.ts deleted file mode 100644 index 0e9f7219fb45..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates packet core data planes tags. - * - * @summary Updates packet core data planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreDataPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesCreateOrUpdateSample.ts deleted file mode 100644 index 2da2d56bdfbd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Service, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a service. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a service. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters: Service = { - location: "eastus", - pccRules: [ - { - ruleName: "default-rule", - rulePrecedence: 255, - ruleQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable" - }, - serviceDataFlowTemplates: [ - { - direction: "Uplink", - ports: [], - remoteIpList: ["10.3.4.0/24"], - templateName: "IP-to-server", - protocol: ["ip"] - } - ], - trafficControl: "Enabled" - } - ], - servicePrecedence: 255, - serviceQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - createService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesDeleteSample.ts deleted file mode 100644 index d88a2200fa0d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - deleteService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesGetSample.ts deleted file mode 100644 index 449dc95ceebb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified service. - * - * @summary Gets information about the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.get( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - getService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesListByMobileNetworkSample.ts deleted file mode 100644 index 062b74b905cf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the services in a mobile network. - * - * @summary Gets all the services in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.services.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listServicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesUpdateTagsSample.ts deleted file mode 100644 index 602401786129..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.updateTags( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - updateServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsCreateOrUpdateSample.ts deleted file mode 100644 index b29f8da76579..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimGroup, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM group. - * - * @summary Creates or updates a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimGroup = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey" - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": {} - } - }, - location: "eastus", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - createSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsDeleteSample.ts deleted file mode 100644 index 5974e50c1dda..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM group. - * - * @summary Deletes the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginDeleteAndWait( - resourceGroupName, - simGroupName - ); - console.log(result); -} - -async function main() { - deleteSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsGetSample.ts deleted file mode 100644 index 7a9321529546..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM group. - * - * @summary Gets information about the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.get(resourceGroupName, simGroupName); - console.log(result); -} - -async function main() { - getSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListByResourceGroupSample.ts deleted file mode 100644 index fcb77b783ce7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a resource group. - * - * @summary Gets all the SIM groups in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListBySubscriptionSample.ts deleted file mode 100644 index c07ede93010e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a subscription. - * - * @summary Gets all the SIM groups in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsUpdateTagsSample.ts deleted file mode 100644 index 41f82587eef1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.updateTags( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b31d5132bded..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimPolicy, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters: SimPolicy = { - defaultSlice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - location: "eastus", - registrationTimer: 3240, - sliceConfigurations: [ - { - dataNetworkConfigurations: [ - { - fiveQi: 9, - additionalAllowedSessionTypes: [], - allocationAndRetentionPriorityLevel: 9, - allowedServices: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService" - } - ], - dataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork" - }, - defaultSessionType: "IPv4", - maximumNumberOfBufferedPackets: 200, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - sessionAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" } - } - ], - defaultDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - } - } - ], - ueAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - createSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesDeleteSample.ts deleted file mode 100644 index 3623dc896150..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM policy. - * - * @summary Deletes the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - deleteSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesGetSample.ts deleted file mode 100644 index 8888aca9e9bf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM policy. - * - * @summary Gets information about the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.get( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - getSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesListByMobileNetworkSample.ts deleted file mode 100644 index d6a3b11cc289..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM policies in a mobile network. - * - * @summary Gets all the SIM policies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simPolicies.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimPoliciesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesUpdateTagsSample.ts deleted file mode 100644 index 59f5c0deaa28..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.updateTags( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkDeleteSample.ts deleted file mode 100644 index 420dbdff1c1e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimDeleteList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk delete SIMs from a SIM group. - * - * @summary Bulk delete SIMs from a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json - */ -async function bulkDeleteSiMSFromASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const parameters: SimDeleteList = { sims: ["testSim", "testSim2"] }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadEncryptedSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadEncryptedSample.ts deleted file mode 100644 index e531847b83b1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadEncryptedSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - EncryptedSimUploadList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @summary Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json - */ -async function bulkUploadEncryptedSiMSToASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: EncryptedSimUploadList = { - azureKeyIdentifier: 1, - encryptedTransportKey: "ABC123", - signedTransportKey: "ABC123", - sims: [ - { - name: "testSim", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }, - { - name: "testSim2", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.2" } - } - ] - } - ], - vendorKeyFingerprint: "ABC123", - version: 1 - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadSample.ts deleted file mode 100644 index 360007383c52..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsBulkUploadSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimUploadList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk upload SIMs to a SIM group. - * - * @summary Bulk upload SIMs to a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json - */ -async function bulkUploadSiMSInASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimUploadList = { - sims: [ - { - name: "testSim", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }, - { - name: "testSim2", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.2" } - } - ] - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsCreateOrUpdateSample.ts deleted file mode 100644 index c89f9eb7af9e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsCreateOrUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Sim, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM. - * - * @summary Creates or updates a SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const parameters: Sim = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - simName, - parameters - ); - console.log(result); -} - -async function main() { - createSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsDeleteSample.ts deleted file mode 100644 index 7594ebc087c3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait( - resourceGroupName, - simGroupName, - simName - ); - console.log(result); -} - -async function main() { - deleteSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsGetSample.ts deleted file mode 100644 index b9a1c49588aa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM. - * - * @summary Gets information about the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get( - resourceGroupName, - simGroupName, - simName - ); - console.log(result); -} - -async function main() { - getSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByGroupSample.ts deleted file mode 100644 index cf9dfb280889..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIMs in a SIM group. - * - * @summary Gets all the SIMs in a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listByGroup( - resourceGroupName, - simGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesCreateOrUpdateSample.ts deleted file mode 100644 index b179193e3e4f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Site, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: Site = { location: "testLocation" }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesDeleteSample.ts deleted file mode 100644 index 7dfa11437e35..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * - * @summary Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - deleteMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesGetSample.ts deleted file mode 100644 index ec161f781273..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network site. - * - * @summary Gets information about the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.get( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - getMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesListByMobileNetworkSample.ts deleted file mode 100644 index 76a412869c34..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all sites in the mobile network. - * - * @summary Lists all sites in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sites.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworkSitesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesUpdateTagsSample.ts deleted file mode 100644 index 744a383a9965..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.updateTags( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkSiteTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesCreateOrUpdateSample.ts deleted file mode 100644 index fd31b3910902..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Slice, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters: Slice = { - description: "myFavouriteSlice", - location: "eastus", - snssai: { sd: "1abcde", sst: 1 } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - createNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesDeleteSample.ts deleted file mode 100644 index 1449d3596972..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified network slice. - * - * @summary Deletes the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - deleteNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesGetSample.ts deleted file mode 100644 index 28f4267ea223..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified network slice. - * - * @summary Gets information about the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.get( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - getNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesListByMobileNetworkSample.ts deleted file mode 100644 index 78adb935b053..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all slices in the mobile network. - * - * @summary Lists all slices in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.slices.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listNetworkSlicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesUpdateTagsSample.ts deleted file mode 100644 index d0970a3bb8a5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.updateTags( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - updateNetworkSliceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/README.md b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/README.md deleted file mode 100644 index 7970ce0897fd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/README.md +++ /dev/null @@ -1,180 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [attachedDataNetworksCreateOrUpdateSample.js][attacheddatanetworkscreateorupdatesample] | Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json | -| [attachedDataNetworksDeleteSample.js][attacheddatanetworksdeletesample] | Deletes the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json | -| [attachedDataNetworksGetSample.js][attacheddatanetworksgetsample] | Gets information about the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json | -| [attachedDataNetworksListByPacketCoreDataPlaneSample.js][attacheddatanetworkslistbypacketcoredataplanesample] | Gets all the attached data networks associated with a packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json | -| [attachedDataNetworksUpdateTagsSample.js][attacheddatanetworksupdatetagssample] | Updates an attached data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json | -| [dataNetworksCreateOrUpdateSample.js][datanetworkscreateorupdatesample] | Creates or updates a data network. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json | -| [dataNetworksDeleteSample.js][datanetworksdeletesample] | Deletes the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json | -| [dataNetworksGetSample.js][datanetworksgetsample] | Gets information about the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json | -| [dataNetworksListByMobileNetworkSample.js][datanetworkslistbymobilenetworksample] | Lists all data networks in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json | -| [dataNetworksUpdateTagsSample.js][datanetworksupdatetagssample] | Updates data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json | -| [mobileNetworksCreateOrUpdateSample.js][mobilenetworkscreateorupdatesample] | Creates or updates a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json | -| [mobileNetworksDeleteSample.js][mobilenetworksdeletesample] | Deletes the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json | -| [mobileNetworksGetSample.js][mobilenetworksgetsample] | Gets information about the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json | -| [mobileNetworksListByResourceGroupSample.js][mobilenetworkslistbyresourcegroupsample] | Lists all the mobile networks in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json | -| [mobileNetworksListBySubscriptionSample.js][mobilenetworkslistbysubscriptionsample] | Lists all the mobile networks in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json | -| [mobileNetworksUpdateTagsSample.js][mobilenetworksupdatetagssample] | Updates mobile network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json | -| [operationsListSample.js][operationslistsample] | Gets a list of the operations. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json | -| [packetCoreControlPlaneVersionsGetSample.js][packetcorecontrolplaneversionsgetsample] | Gets information about the specified packet core control plane version. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json | -| [packetCoreControlPlaneVersionsListSample.js][packetcorecontrolplaneversionslistsample] | Lists all supported packet core control planes versions. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json | -| [packetCoreControlPlanesCollectDiagnosticsPackageSample.js][packetcorecontrolplanescollectdiagnosticspackagesample] | Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json | -| [packetCoreControlPlanesCreateOrUpdateSample.js][packetcorecontrolplanescreateorupdatesample] | Creates or updates a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json | -| [packetCoreControlPlanesDeleteSample.js][packetcorecontrolplanesdeletesample] | Deletes the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json | -| [packetCoreControlPlanesGetSample.js][packetcorecontrolplanesgetsample] | Gets information about the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json | -| [packetCoreControlPlanesListByResourceGroupSample.js][packetcorecontrolplaneslistbyresourcegroupsample] | Lists all the packet core control planes in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json | -| [packetCoreControlPlanesListBySubscriptionSample.js][packetcorecontrolplaneslistbysubscriptionsample] | Lists all the packet core control planes in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json | -| [packetCoreControlPlanesReinstallSample.js][packetcorecontrolplanesreinstallsample] | Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json | -| [packetCoreControlPlanesRollbackSample.js][packetcorecontrolplanesrollbacksample] | Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json | -| [packetCoreControlPlanesUpdateTagsSample.js][packetcorecontrolplanesupdatetagssample] | Updates packet core control planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json | -| [packetCoreDataPlanesCreateOrUpdateSample.js][packetcoredataplanescreateorupdatesample] | Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json | -| [packetCoreDataPlanesDeleteSample.js][packetcoredataplanesdeletesample] | Deletes the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json | -| [packetCoreDataPlanesGetSample.js][packetcoredataplanesgetsample] | Gets information about the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json | -| [packetCoreDataPlanesListByPacketCoreControlPlaneSample.js][packetcoredataplaneslistbypacketcorecontrolplanesample] | Lists all the packet core data planes associated with a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json | -| [packetCoreDataPlanesUpdateTagsSample.js][packetcoredataplanesupdatetagssample] | Updates packet core data planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json | -| [servicesCreateOrUpdateSample.js][servicescreateorupdatesample] | Creates or updates a service. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json | -| [servicesDeleteSample.js][servicesdeletesample] | Deletes the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json | -| [servicesGetSample.js][servicesgetsample] | Gets information about the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json | -| [servicesListByMobileNetworkSample.js][serviceslistbymobilenetworksample] | Gets all the services in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json | -| [servicesUpdateTagsSample.js][servicesupdatetagssample] | Updates service tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json | -| [simGroupsCreateOrUpdateSample.js][simgroupscreateorupdatesample] | Creates or updates a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json | -| [simGroupsDeleteSample.js][simgroupsdeletesample] | Deletes the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json | -| [simGroupsGetSample.js][simgroupsgetsample] | Gets information about the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json | -| [simGroupsListByResourceGroupSample.js][simgroupslistbyresourcegroupsample] | Gets all the SIM groups in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json | -| [simGroupsListBySubscriptionSample.js][simgroupslistbysubscriptionsample] | Gets all the SIM groups in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json | -| [simGroupsUpdateTagsSample.js][simgroupsupdatetagssample] | Updates SIM group tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json | -| [simPoliciesCreateOrUpdateSample.js][simpoliciescreateorupdatesample] | Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json | -| [simPoliciesDeleteSample.js][simpoliciesdeletesample] | Deletes the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json | -| [simPoliciesGetSample.js][simpoliciesgetsample] | Gets information about the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json | -| [simPoliciesListByMobileNetworkSample.js][simpolicieslistbymobilenetworksample] | Gets all the SIM policies in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json | -| [simPoliciesUpdateTagsSample.js][simpoliciesupdatetagssample] | Updates SIM policy tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json | -| [simsBulkDeleteSample.js][simsbulkdeletesample] | Bulk delete SIMs from a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json | -| [simsBulkUploadEncryptedSample.js][simsbulkuploadencryptedsample] | Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json | -| [simsBulkUploadSample.js][simsbulkuploadsample] | Bulk upload SIMs to a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json | -| [simsCreateOrUpdateSample.js][simscreateorupdatesample] | Creates or updates a SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json | -| [simsDeleteSample.js][simsdeletesample] | Deletes the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json | -| [simsGetSample.js][simsgetsample] | Gets information about the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json | -| [simsListByGroupSample.js][simslistbygroupsample] | Gets all the SIMs in a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json | -| [sitesCreateOrUpdateSample.js][sitescreateorupdatesample] | Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json | -| [sitesDeleteSample.js][sitesdeletesample] | Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json | -| [sitesGetSample.js][sitesgetsample] | Gets information about the specified mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json | -| [sitesListByMobileNetworkSample.js][siteslistbymobilenetworksample] | Lists all sites in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json | -| [sitesUpdateTagsSample.js][sitesupdatetagssample] | Updates site tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json | -| [slicesCreateOrUpdateSample.js][slicescreateorupdatesample] | Creates or updates a network slice. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json | -| [slicesDeleteSample.js][slicesdeletesample] | Deletes the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json | -| [slicesGetSample.js][slicesgetsample] | Gets information about the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json | -| [slicesListByMobileNetworkSample.js][sliceslistbymobilenetworksample] | Lists all slices in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json | -| [slicesUpdateTagsSample.js][slicesupdatetagssample] | Updates slice tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node attachedDataNetworksCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env MOBILENETWORK_SUBSCRIPTION_ID="" MOBILENETWORK_RESOURCE_GROUP="" node attachedDataNetworksCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[attacheddatanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksCreateOrUpdateSample.js -[attacheddatanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksDeleteSample.js -[attacheddatanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksGetSample.js -[attacheddatanetworkslistbypacketcoredataplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js -[attacheddatanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksUpdateTagsSample.js -[datanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksCreateOrUpdateSample.js -[datanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksDeleteSample.js -[datanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksGetSample.js -[datanetworkslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksListByMobileNetworkSample.js -[datanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksUpdateTagsSample.js -[mobilenetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksCreateOrUpdateSample.js -[mobilenetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksDeleteSample.js -[mobilenetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksGetSample.js -[mobilenetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListByResourceGroupSample.js -[mobilenetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListBySubscriptionSample.js -[mobilenetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksUpdateTagsSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/operationsListSample.js -[packetcorecontrolplaneversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsGetSample.js -[packetcorecontrolplaneversionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsListSample.js -[packetcorecontrolplanescollectdiagnosticspackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCollectDiagnosticsPackageSample.js -[packetcorecontrolplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCreateOrUpdateSample.js -[packetcorecontrolplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesDeleteSample.js -[packetcorecontrolplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesGetSample.js -[packetcorecontrolplaneslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListByResourceGroupSample.js -[packetcorecontrolplaneslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListBySubscriptionSample.js -[packetcorecontrolplanesreinstallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesReinstallSample.js -[packetcorecontrolplanesrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesRollbackSample.js -[packetcorecontrolplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesUpdateTagsSample.js -[packetcoredataplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesCreateOrUpdateSample.js -[packetcoredataplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesDeleteSample.js -[packetcoredataplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesGetSample.js -[packetcoredataplaneslistbypacketcorecontrolplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js -[packetcoredataplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesUpdateTagsSample.js -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesCreateOrUpdateSample.js -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesDeleteSample.js -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesGetSample.js -[serviceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesListByMobileNetworkSample.js -[servicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesUpdateTagsSample.js -[simgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsCreateOrUpdateSample.js -[simgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsDeleteSample.js -[simgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsGetSample.js -[simgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListByResourceGroupSample.js -[simgroupslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListBySubscriptionSample.js -[simgroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsUpdateTagsSample.js -[simpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesCreateOrUpdateSample.js -[simpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesDeleteSample.js -[simpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesGetSample.js -[simpolicieslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesListByMobileNetworkSample.js -[simpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesUpdateTagsSample.js -[simsbulkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkDeleteSample.js -[simsbulkuploadencryptedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadEncryptedSample.js -[simsbulkuploadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadSample.js -[simscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsCreateOrUpdateSample.js -[simsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsDeleteSample.js -[simsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsGetSample.js -[simslistbygroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsListByGroupSample.js -[sitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesCreateOrUpdateSample.js -[sitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesDeleteSample.js -[sitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesGetSample.js -[siteslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesListByMobileNetworkSample.js -[sitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesUpdateTagsSample.js -[slicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesCreateOrUpdateSample.js -[slicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesDeleteSample.js -[slicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesGetSample.js -[sliceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesListByMobileNetworkSample.js -[slicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesUpdateTagsSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork/README.md diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksCreateOrUpdateSample.js deleted file mode 100644 index 5c6baf742af0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * - * @summary Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters = { - dnsAddresses: ["1.1.1.1"], - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 30, tcp: 180, udp: 30 }, - portRange: { maxPort: 49999, minPort: 1024 }, - portReuseHoldTime: { tcp: 120, udp: 60 }, - }, - userEquipmentAddressPoolPrefix: ["2.2.0.0/16"], - userEquipmentStaticAddressPoolPrefix: ["2.4.0.0/16"], - userPlaneDataInterface: { name: "N6" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksDeleteSample.js deleted file mode 100644 index 4fa14dfb5903..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksDeleteSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified attached data network. - * - * @summary Deletes the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - deleteAttachedDataNetworkResource(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksGetSample.js deleted file mode 100644 index c25e405e65c1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksGetSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified attached data network. - * - * @summary Gets information about the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - getAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js deleted file mode 100644 index 7ed2b68928a9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the attached data networks associated with a packet core data plane. - * - * @summary Gets all the attached data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.attachedDataNetworks.listByPacketCoreDataPlane( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAttachedDataNetworksInADataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksUpdateTagsSample.js deleted file mode 100644 index db0c8a0cbf86..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/attachedDataNetworksUpdateTagsSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an attached data network tags. - * - * @summary Updates an attached data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateAttachedDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksCreateOrUpdateSample.js deleted file mode 100644 index 3838c7f63f3a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a data network. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a data network. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters = { - description: "myFavouriteDataNetwork", - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksDeleteSample.js deleted file mode 100644 index 83e782be4951..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified data network. - * - * @summary Deletes the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - deleteDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksGetSample.js deleted file mode 100644 index 9f891ba74cc1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksGetSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified data network. - * - * @summary Gets information about the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.get( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - getDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksListByMobileNetworkSample.js deleted file mode 100644 index bd68fd6667ca..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksListByMobileNetworkSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all data networks in the mobile network. - * - * @summary Lists all data networks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataNetworks.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataNetworksInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksUpdateTagsSample.js deleted file mode 100644 index 5a7c0ed1216e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/dataNetworksUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksCreateOrUpdateSample.js deleted file mode 100644 index 65b194a8d8f8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network. - * - * @summary Creates or updates a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters = { - location: "eastus", - publicLandMobileNetworkIdentifier: { mcc: "001", mnc: "01" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksDeleteSample.js deleted file mode 100644 index e055bdd47b5e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network. - * - * @summary Deletes the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - deleteMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksGetSample.js deleted file mode 100644 index f2bf80ac8e0d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network. - * - * @summary Gets information about the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.get(resourceGroupName, mobileNetworkName); - console.log(result); -} - -async function main() { - getMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListByResourceGroupSample.js deleted file mode 100644 index 675f5c83a76b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListByResourceGroupSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a resource group. - * - * @summary Lists all the mobile networks in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListBySubscriptionSample.js deleted file mode 100644 index 25b34e8be0eb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksListBySubscriptionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a subscription. - * - * @summary Lists all the mobile networks in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksUpdateTagsSample.js deleted file mode 100644 index 8cd4ff6e11f6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/mobileNetworksUpdateTagsSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/operationsListSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/operationsListSample.js deleted file mode 100644 index 9b210d381733..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a list of the operations. - * - * @summary Gets a list of the operations. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getRegistrationOperations(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/package.json deleted file mode 100644 index b221a595c7d9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-mobilenetwork-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/mobilenetwork/arm-mobilenetwork" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork", - "dependencies": { - "@azure/arm-mobilenetwork": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsGetSample.js deleted file mode 100644 index 9fe9b159ac29..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane version. - * - * @summary Gets information about the specified packet core control plane version. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const versionName = "PMN-4-11-1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlaneVersions.get(versionName); - console.log(result); -} - -async function main() { - getPacketCoreControlPlaneVersion(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsListSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsListSample.js deleted file mode 100644 index 87c07bdd5692..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlaneVersionsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all supported packet core control planes versions. - * - * @summary Lists all supported packet core control planes versions. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlaneVersions.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getSupportedPacketCoreControlPlaneVersions(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCollectDiagnosticsPackageSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCollectDiagnosticsPackageSample.js deleted file mode 100644 index 1d42fef805b6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCollectDiagnosticsPackageSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * - * @summary Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json - */ -async function collectDiagnosticsPackageFromPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters = { - storageAccountBlobUrl: - "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip", - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCreateOrUpdateSample.js deleted file mode 100644 index a069cfbee225..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesCreateOrUpdateSample.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a packet core control plane. - * - * @summary Creates or updates a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - authenticationType: "AAD", - httpsServerCertificate: { - certificateUrl: "https://contosovault.vault.azure.net/certificates/ingress", - }, - }, - location: "eastus", - platform: { - type: "AKS-HCI", - azureStackEdgeDevice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice", - }, - connectedCluster: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster", - }, - customLocation: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation", - }, - }, - sites: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite", - }, - ], - sku: "G0", - ueMtu: 1600, - version: "0.2.0", - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesDeleteSample.js deleted file mode 100644 index c16c159dfd4e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified packet core control plane. - * - * @summary Deletes the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesGetSample.js deleted file mode 100644 index 9a78d681c849..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane. - * - * @summary Gets information about the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.get( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListByResourceGroupSample.js deleted file mode 100644 index 1222e962443f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListByResourceGroupSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a resource group. - * - * @summary Lists all the packet core control planes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListBySubscriptionSample.js deleted file mode 100644 index 9b8c03ac6fdf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesListBySubscriptionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a subscription. - * - * @summary Lists all the packet core control planes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesReinstallSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesReinstallSample.js deleted file mode 100644 index f185143b8c6e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesReinstallSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * - * @summary Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json - */ -async function reinstallPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesRollbackSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesRollbackSample.js deleted file mode 100644 index daa9cd2af594..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesRollbackSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * - * @summary Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json - */ -async function rollbackPacketCoreControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesUpdateTagsSample.js deleted file mode 100644 index 5c9fdc0fa743..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreControlPlanesUpdateTagsSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates packet core control planes tags. - * - * @summary Updates packet core control planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreControlPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesCreateOrUpdateSample.js deleted file mode 100644 index 4cb0d26b9b96..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * - * @summary Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters = { - location: "eastus", - userPlaneAccessInterface: { name: "N3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesDeleteSample.js deleted file mode 100644 index 65180b09db86..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified packet core data plane. - * - * @summary Deletes the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesGetSample.js deleted file mode 100644 index f3f13e209849..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesGetSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core data plane. - * - * @summary Gets information about the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js deleted file mode 100644 index 8f00484cd85f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the packet core data planes associated with a packet core control plane. - * - * @summary Lists all the packet core data planes associated with a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreDataPlanes.listByPacketCoreControlPlane( - resourceGroupName, - packetCoreControlPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreDataPlanesInAControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesUpdateTagsSample.js deleted file mode 100644 index 4fcbc0cd6ba6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/packetCoreDataPlanesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates packet core data planes tags. - * - * @summary Updates packet core data planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreDataPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesCreateOrUpdateSample.js deleted file mode 100644 index 493fcbff5100..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesCreateOrUpdateSample.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a service. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a service. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters = { - location: "eastus", - pccRules: [ - { - ruleName: "default-rule", - rulePrecedence: 255, - ruleQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - }, - serviceDataFlowTemplates: [ - { - direction: "Uplink", - ports: [], - remoteIpList: ["10.3.4.0/24"], - templateName: "IP-to-server", - protocol: ["ip"], - }, - ], - trafficControl: "Enabled", - }, - ], - servicePrecedence: 255, - serviceQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - createService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesDeleteSample.js deleted file mode 100644 index 8ee76e2ac9d3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - deleteService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesGetSample.js deleted file mode 100644 index 44029429ee7d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified service. - * - * @summary Gets information about the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.get(resourceGroupName, mobileNetworkName, serviceName); - console.log(result); -} - -async function main() { - getService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesListByMobileNetworkSample.js deleted file mode 100644 index b696c9b8d3da..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesListByMobileNetworkSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the services in a mobile network. - * - * @summary Gets all the services in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.services.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listServicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesUpdateTagsSample.js deleted file mode 100644 index 48fabe896633..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/servicesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.updateTags( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - updateServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsCreateOrUpdateSample.js deleted file mode 100644 index 39b158bd1513..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a SIM group. - * - * @summary Creates or updates a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": - {}, - }, - }, - location: "eastus", - mobileNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - createSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsDeleteSample.js deleted file mode 100644 index 62d2675612cb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified SIM group. - * - * @summary Deletes the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginDeleteAndWait(resourceGroupName, simGroupName); - console.log(result); -} - -async function main() { - deleteSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsGetSample.js deleted file mode 100644 index b8959fa8b952..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM group. - * - * @summary Gets information about the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.get(resourceGroupName, simGroupName); - console.log(result); -} - -async function main() { - getSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListByResourceGroupSample.js deleted file mode 100644 index 43b025340716..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListByResourceGroupSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a resource group. - * - * @summary Gets all the SIM groups in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListBySubscriptionSample.js deleted file mode 100644 index cf0f521eee9d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsListBySubscriptionSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a subscription. - * - * @summary Gets all the SIM groups in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsUpdateTagsSample.js deleted file mode 100644 index 13ee992e77e4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simGroupsUpdateTagsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.updateTags(resourceGroupName, simGroupName, parameters); - console.log(result); -} - -async function main() { - updateSimGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 63acb08870e3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters = { - defaultSlice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - location: "eastus", - registrationTimer: 3240, - sliceConfigurations: [ - { - dataNetworkConfigurations: [ - { - fiveQi: 9, - additionalAllowedSessionTypes: [], - allocationAndRetentionPriorityLevel: 9, - allowedServices: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService", - }, - ], - dataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork", - }, - defaultSessionType: "IPv4", - maximumNumberOfBufferedPackets: 200, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - sessionAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" }, - }, - ], - defaultDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - }, - ], - ueAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - createSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesDeleteSample.js deleted file mode 100644 index 67c26fcae9b3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified SIM policy. - * - * @summary Deletes the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - deleteSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesGetSample.js deleted file mode 100644 index de4390217047..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM policy. - * - * @summary Gets information about the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.get(resourceGroupName, mobileNetworkName, simPolicyName); - console.log(result); -} - -async function main() { - getSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesListByMobileNetworkSample.js deleted file mode 100644 index f6816ca50f69..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesListByMobileNetworkSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the SIM policies in a mobile network. - * - * @summary Gets all the SIM policies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simPolicies.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimPoliciesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesUpdateTagsSample.js deleted file mode 100644 index 5f52f825e11c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simPoliciesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.updateTags( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkDeleteSample.js deleted file mode 100644 index d2e319e04077..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Bulk delete SIMs from a SIM group. - * - * @summary Bulk delete SIMs from a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json - */ -async function bulkDeleteSiMSFromASimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const parameters = { sims: ["testSim", "testSim2"] }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadEncryptedSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadEncryptedSample.js deleted file mode 100644 index 1fa75697b6c1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadEncryptedSample.js +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @summary Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json - */ -async function bulkUploadEncryptedSiMSToASimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { - azureKeyIdentifier: 1, - encryptedTransportKey: "ABC123", - signedTransportKey: "ABC123", - sims: [ - { - name: "testSim", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.1" }, - }, - ], - }, - { - name: "testSim2", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.2" }, - }, - ], - }, - ], - vendorKeyFingerprint: "ABC123", - version: 1, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadSample.js deleted file mode 100644 index 8ff0df6ea55c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsBulkUploadSample.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Bulk upload SIMs to a SIM group. - * - * @summary Bulk upload SIMs to a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json - */ -async function bulkUploadSiMSInASimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { - sims: [ - { - name: "testSim", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.1" }, - }, - ], - }, - { - name: "testSim2", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.2" }, - }, - ], - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsCreateOrUpdateSample.js deleted file mode 100644 index 33c26594009f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsCreateOrUpdateSample.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a SIM. - * - * @summary Creates or updates a SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const parameters = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy", - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork", - }, - slice: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice", - }, - staticIp: { ipv4Address: "2.4.0.1" }, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - simName, - parameters - ); - console.log(result); -} - -async function main() { - createSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsDeleteSample.js deleted file mode 100644 index 3ee07847cdf6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait(resourceGroupName, simGroupName, simName); - console.log(result); -} - -async function main() { - deleteSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsGetSample.js deleted file mode 100644 index 64f9dbfd1cbb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM. - * - * @summary Gets information about the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get(resourceGroupName, simGroupName, simName); - console.log(result); -} - -async function main() { - getSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsListByGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsListByGroupSample.js deleted file mode 100644 index bd46ee89bb4a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/simsListByGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all the SIMs in a SIM group. - * - * @summary Gets all the SIMs in a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listByGroup(resourceGroupName, simGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesCreateOrUpdateSample.js deleted file mode 100644 index 3431a47df3f5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesCreateOrUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters = { location: "testLocation" }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesDeleteSample.js deleted file mode 100644 index 961e267ee931..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * - * @summary Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - deleteMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesGetSample.js deleted file mode 100644 index 265ec610c26e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network site. - * - * @summary Gets information about the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.get(resourceGroupName, mobileNetworkName, siteName); - console.log(result); -} - -async function main() { - getMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesListByMobileNetworkSample.js deleted file mode 100644 index af1a56267d19..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesListByMobileNetworkSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all sites in the mobile network. - * - * @summary Lists all sites in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sites.listByMobileNetwork(resourceGroupName, mobileNetworkName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworkSitesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesUpdateTagsSample.js deleted file mode 100644 index 040d6d57fd44..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/sitesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.updateTags( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkSiteTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesCreateOrUpdateSample.js deleted file mode 100644 index 191e4c0da218..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters = { - description: "myFavouriteSlice", - location: "eastus", - snssai: { sd: "1abcde", sst: 1 }, - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - createNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesDeleteSample.js deleted file mode 100644 index 795c8b192469..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesDeleteSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified network slice. - * - * @summary Deletes the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - deleteNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesGetSample.js deleted file mode 100644 index f77ee0471014..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about the specified network slice. - * - * @summary Gets information about the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.get(resourceGroupName, mobileNetworkName, sliceName); - console.log(result); -} - -async function main() { - getNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesListByMobileNetworkSample.js deleted file mode 100644 index 3445fc7496af..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesListByMobileNetworkSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all slices in the mobile network. - * - * @summary Lists all slices in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.slices.listByMobileNetwork(resourceGroupName, mobileNetworkName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listNetworkSlicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesUpdateTagsSample.js deleted file mode 100644 index 6bb334d73838..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/javascript/slicesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.updateTags( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - updateNetworkSliceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/README.md b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/README.md deleted file mode 100644 index f5e2d43e00bf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [attachedDataNetworksCreateOrUpdateSample.ts][attacheddatanetworkscreateorupdatesample] | Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json | -| [attachedDataNetworksDeleteSample.ts][attacheddatanetworksdeletesample] | Deletes the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json | -| [attachedDataNetworksGetSample.ts][attacheddatanetworksgetsample] | Gets information about the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json | -| [attachedDataNetworksListByPacketCoreDataPlaneSample.ts][attacheddatanetworkslistbypacketcoredataplanesample] | Gets all the attached data networks associated with a packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json | -| [attachedDataNetworksUpdateTagsSample.ts][attacheddatanetworksupdatetagssample] | Updates an attached data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json | -| [dataNetworksCreateOrUpdateSample.ts][datanetworkscreateorupdatesample] | Creates or updates a data network. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json | -| [dataNetworksDeleteSample.ts][datanetworksdeletesample] | Deletes the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json | -| [dataNetworksGetSample.ts][datanetworksgetsample] | Gets information about the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json | -| [dataNetworksListByMobileNetworkSample.ts][datanetworkslistbymobilenetworksample] | Lists all data networks in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json | -| [dataNetworksUpdateTagsSample.ts][datanetworksupdatetagssample] | Updates data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json | -| [mobileNetworksCreateOrUpdateSample.ts][mobilenetworkscreateorupdatesample] | Creates or updates a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json | -| [mobileNetworksDeleteSample.ts][mobilenetworksdeletesample] | Deletes the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json | -| [mobileNetworksGetSample.ts][mobilenetworksgetsample] | Gets information about the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json | -| [mobileNetworksListByResourceGroupSample.ts][mobilenetworkslistbyresourcegroupsample] | Lists all the mobile networks in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json | -| [mobileNetworksListBySubscriptionSample.ts][mobilenetworkslistbysubscriptionsample] | Lists all the mobile networks in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json | -| [mobileNetworksUpdateTagsSample.ts][mobilenetworksupdatetagssample] | Updates mobile network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json | -| [operationsListSample.ts][operationslistsample] | Gets a list of the operations. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json | -| [packetCoreControlPlaneVersionsGetSample.ts][packetcorecontrolplaneversionsgetsample] | Gets information about the specified packet core control plane version. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json | -| [packetCoreControlPlaneVersionsListSample.ts][packetcorecontrolplaneversionslistsample] | Lists all supported packet core control planes versions. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json | -| [packetCoreControlPlanesCollectDiagnosticsPackageSample.ts][packetcorecontrolplanescollectdiagnosticspackagesample] | Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json | -| [packetCoreControlPlanesCreateOrUpdateSample.ts][packetcorecontrolplanescreateorupdatesample] | Creates or updates a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json | -| [packetCoreControlPlanesDeleteSample.ts][packetcorecontrolplanesdeletesample] | Deletes the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json | -| [packetCoreControlPlanesGetSample.ts][packetcorecontrolplanesgetsample] | Gets information about the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json | -| [packetCoreControlPlanesListByResourceGroupSample.ts][packetcorecontrolplaneslistbyresourcegroupsample] | Lists all the packet core control planes in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json | -| [packetCoreControlPlanesListBySubscriptionSample.ts][packetcorecontrolplaneslistbysubscriptionsample] | Lists all the packet core control planes in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json | -| [packetCoreControlPlanesReinstallSample.ts][packetcorecontrolplanesreinstallsample] | Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json | -| [packetCoreControlPlanesRollbackSample.ts][packetcorecontrolplanesrollbacksample] | Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json | -| [packetCoreControlPlanesUpdateTagsSample.ts][packetcorecontrolplanesupdatetagssample] | Updates packet core control planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json | -| [packetCoreDataPlanesCreateOrUpdateSample.ts][packetcoredataplanescreateorupdatesample] | Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json | -| [packetCoreDataPlanesDeleteSample.ts][packetcoredataplanesdeletesample] | Deletes the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json | -| [packetCoreDataPlanesGetSample.ts][packetcoredataplanesgetsample] | Gets information about the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json | -| [packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts][packetcoredataplaneslistbypacketcorecontrolplanesample] | Lists all the packet core data planes associated with a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json | -| [packetCoreDataPlanesUpdateTagsSample.ts][packetcoredataplanesupdatetagssample] | Updates packet core data planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json | -| [servicesCreateOrUpdateSample.ts][servicescreateorupdatesample] | Creates or updates a service. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json | -| [servicesDeleteSample.ts][servicesdeletesample] | Deletes the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json | -| [servicesGetSample.ts][servicesgetsample] | Gets information about the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json | -| [servicesListByMobileNetworkSample.ts][serviceslistbymobilenetworksample] | Gets all the services in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json | -| [servicesUpdateTagsSample.ts][servicesupdatetagssample] | Updates service tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json | -| [simGroupsCreateOrUpdateSample.ts][simgroupscreateorupdatesample] | Creates or updates a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json | -| [simGroupsDeleteSample.ts][simgroupsdeletesample] | Deletes the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json | -| [simGroupsGetSample.ts][simgroupsgetsample] | Gets information about the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json | -| [simGroupsListByResourceGroupSample.ts][simgroupslistbyresourcegroupsample] | Gets all the SIM groups in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json | -| [simGroupsListBySubscriptionSample.ts][simgroupslistbysubscriptionsample] | Gets all the SIM groups in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json | -| [simGroupsUpdateTagsSample.ts][simgroupsupdatetagssample] | Updates SIM group tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json | -| [simPoliciesCreateOrUpdateSample.ts][simpoliciescreateorupdatesample] | Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json | -| [simPoliciesDeleteSample.ts][simpoliciesdeletesample] | Deletes the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json | -| [simPoliciesGetSample.ts][simpoliciesgetsample] | Gets information about the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json | -| [simPoliciesListByMobileNetworkSample.ts][simpolicieslistbymobilenetworksample] | Gets all the SIM policies in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json | -| [simPoliciesUpdateTagsSample.ts][simpoliciesupdatetagssample] | Updates SIM policy tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json | -| [simsBulkDeleteSample.ts][simsbulkdeletesample] | Bulk delete SIMs from a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json | -| [simsBulkUploadEncryptedSample.ts][simsbulkuploadencryptedsample] | Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json | -| [simsBulkUploadSample.ts][simsbulkuploadsample] | Bulk upload SIMs to a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json | -| [simsCreateOrUpdateSample.ts][simscreateorupdatesample] | Creates or updates a SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json | -| [simsDeleteSample.ts][simsdeletesample] | Deletes the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json | -| [simsGetSample.ts][simsgetsample] | Gets information about the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json | -| [simsListByGroupSample.ts][simslistbygroupsample] | Gets all the SIMs in a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json | -| [sitesCreateOrUpdateSample.ts][sitescreateorupdatesample] | Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json | -| [sitesDeleteSample.ts][sitesdeletesample] | Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json | -| [sitesGetSample.ts][sitesgetsample] | Gets information about the specified mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json | -| [sitesListByMobileNetworkSample.ts][siteslistbymobilenetworksample] | Lists all sites in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json | -| [sitesUpdateTagsSample.ts][sitesupdatetagssample] | Updates site tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json | -| [slicesCreateOrUpdateSample.ts][slicescreateorupdatesample] | Creates or updates a network slice. Must be created in the same location as its parent mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json | -| [slicesDeleteSample.ts][slicesdeletesample] | Deletes the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json | -| [slicesGetSample.ts][slicesgetsample] | Gets information about the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json | -| [slicesListByMobileNetworkSample.ts][sliceslistbymobilenetworksample] | Lists all slices in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json | -| [slicesUpdateTagsSample.ts][slicesupdatetagssample] | Updates slice tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/attachedDataNetworksCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env MOBILENETWORK_SUBSCRIPTION_ID="" MOBILENETWORK_RESOURCE_GROUP="" node dist/attachedDataNetworksCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[attacheddatanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts -[attacheddatanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksDeleteSample.ts -[attacheddatanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksGetSample.ts -[attacheddatanetworkslistbypacketcoredataplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts -[attacheddatanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksUpdateTagsSample.ts -[datanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksCreateOrUpdateSample.ts -[datanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksDeleteSample.ts -[datanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksGetSample.ts -[datanetworkslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksListByMobileNetworkSample.ts -[datanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksUpdateTagsSample.ts -[mobilenetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksCreateOrUpdateSample.ts -[mobilenetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksDeleteSample.ts -[mobilenetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksGetSample.ts -[mobilenetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListByResourceGroupSample.ts -[mobilenetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListBySubscriptionSample.ts -[mobilenetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksUpdateTagsSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/operationsListSample.ts -[packetcorecontrolplaneversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsGetSample.ts -[packetcorecontrolplaneversionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsListSample.ts -[packetcorecontrolplanescollectdiagnosticspackagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts -[packetcorecontrolplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts -[packetcorecontrolplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesDeleteSample.ts -[packetcorecontrolplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesGetSample.ts -[packetcorecontrolplaneslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts -[packetcorecontrolplaneslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts -[packetcorecontrolplanesreinstallsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesReinstallSample.ts -[packetcorecontrolplanesrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesRollbackSample.ts -[packetcorecontrolplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts -[packetcoredataplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts -[packetcoredataplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesDeleteSample.ts -[packetcoredataplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesGetSample.ts -[packetcoredataplaneslistbypacketcorecontrolplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts -[packetcoredataplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesCreateOrUpdateSample.ts -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesDeleteSample.ts -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesGetSample.ts -[serviceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesListByMobileNetworkSample.ts -[servicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesUpdateTagsSample.ts -[simgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsCreateOrUpdateSample.ts -[simgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsDeleteSample.ts -[simgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsGetSample.ts -[simgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListByResourceGroupSample.ts -[simgroupslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListBySubscriptionSample.ts -[simgroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsUpdateTagsSample.ts -[simpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesCreateOrUpdateSample.ts -[simpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesDeleteSample.ts -[simpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesGetSample.ts -[simpolicieslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesListByMobileNetworkSample.ts -[simpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesUpdateTagsSample.ts -[simsbulkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkDeleteSample.ts -[simsbulkuploadencryptedsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadEncryptedSample.ts -[simsbulkuploadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadSample.ts -[simscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsCreateOrUpdateSample.ts -[simsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsDeleteSample.ts -[simsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsGetSample.ts -[simslistbygroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsListByGroupSample.ts -[sitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesCreateOrUpdateSample.ts -[sitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesDeleteSample.ts -[sitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesGetSample.ts -[siteslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesListByMobileNetworkSample.ts -[sitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesUpdateTagsSample.ts -[slicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesCreateOrUpdateSample.ts -[slicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesDeleteSample.ts -[slicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesGetSample.ts -[sliceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesListByMobileNetworkSample.ts -[slicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesUpdateTagsSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/package.json deleted file mode 100644 index 5ae6d1dd5e01..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-mobilenetwork-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/mobilenetwork/arm-mobilenetwork" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork", - "dependencies": { - "@azure/arm-mobilenetwork": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~5.0.0", - "rimraf": "latest" - } -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 791c63bdec48..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AttachedDataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * - * @summary Creates or updates an attached data network. Must be created in the same location as its parent packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters: AttachedDataNetwork = { - dnsAddresses: ["1.1.1.1"], - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 30, tcp: 180, udp: 30 }, - portRange: { maxPort: 49999, minPort: 1024 }, - portReuseHoldTime: { tcp: 120, udp: 60 } - }, - userEquipmentAddressPoolPrefix: ["2.2.0.0/16"], - userEquipmentStaticAddressPoolPrefix: ["2.4.0.0/16"], - userPlaneDataInterface: { name: "N6" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksDeleteSample.ts deleted file mode 100644 index e30cf94458c7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksDeleteSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified attached data network. - * - * @summary Deletes the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - deleteAttachedDataNetworkResource(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksGetSample.ts deleted file mode 100644 index b6badff4dcb2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksGetSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified attached data network. - * - * @summary Gets information about the specified attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName - ); - console.log(result); -} - -async function main() { - getAttachedDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts deleted file mode 100644 index 744af2341db7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the attached data networks associated with a packet core data plane. - * - * @summary Gets all the attached data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.attachedDataNetworks.listByPacketCoreDataPlane( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAttachedDataNetworksInADataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksUpdateTagsSample.ts deleted file mode 100644 index e3b12165d513..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/attachedDataNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an attached data network tags. - * - * @summary Updates an attached data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const packetCoreDataPlaneName = "TestPacketCoreDP"; - const attachedDataNetworkName = "TestAttachedDataNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.attachedDataNetworks.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - attachedDataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateAttachedDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 983eb31c63e4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a data network. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a data network. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters: DataNetwork = { - description: "myFavouriteDataNetwork", - location: "eastus" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksDeleteSample.ts deleted file mode 100644 index c37d17fb818b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified data network. - * - * @summary Deletes the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - deleteDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksGetSample.ts deleted file mode 100644 index c305a7fae7b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified data network. - * - * @summary Gets information about the specified data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.get( - resourceGroupName, - mobileNetworkName, - dataNetworkName - ); - console.log(result); -} - -async function main() { - getDataNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksListByMobileNetworkSample.ts deleted file mode 100644 index f558493bee5d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data networks in the mobile network. - * - * @summary Lists all data networks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataNetworks.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataNetworksInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksUpdateTagsSample.ts deleted file mode 100644 index 4b6edda19847..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/dataNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const dataNetworkName = "testDataNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.dataNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - dataNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateDataNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 7ba80547b2ae..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MobileNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network. - * - * @summary Creates or updates a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters: MobileNetwork = { - location: "eastus", - publicLandMobileNetworkIdentifier: { mcc: "001", mnc: "01" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksDeleteSample.ts deleted file mode 100644 index 2e35d2a808a2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network. - * - * @summary Deletes the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - deleteMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksGetSample.ts deleted file mode 100644 index f8bb34b1370f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network. - * - * @summary Gets information about the specified mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.get( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -async function main() { - getMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListByResourceGroupSample.ts deleted file mode 100644 index 348fc0ea2d4c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a resource group. - * - * @summary Lists all the mobile networks in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListBySubscriptionSample.ts deleted file mode 100644 index e91d8627cc38..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the mobile networks in a subscription. - * - * @summary Lists all the mobile networks in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.mobileNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworksInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksUpdateTagsSample.ts deleted file mode 100644 index d86c8fe08f93..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/mobileNetworksUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.updateTags( - resourceGroupName, - mobileNetworkName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/operationsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/operationsListSample.ts deleted file mode 100644 index 7d825d29dfc5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of the operations. - * - * @summary Gets a list of the operations. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getRegistrationOperations(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsGetSample.ts deleted file mode 100644 index 1ce3132540dc..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane version. - * - * @summary Gets information about the specified packet core control plane version. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const versionName = "PMN-4-11-1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlaneVersions.get(versionName); - console.log(result); -} - -async function main() { - getPacketCoreControlPlaneVersion(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsListSample.ts deleted file mode 100644 index 63dad3ce3740..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlaneVersionsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all supported packet core control planes versions. - * - * @summary Lists all supported packet core control planes versions. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlaneVersions.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getSupportedPacketCoreControlPlaneVersions(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts deleted file mode 100644 index 8e131575a9d9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCollectDiagnosticsPackageSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlaneCollectDiagnosticsPackage, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * - * @summary Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json - */ -async function collectDiagnosticsPackageFromPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlaneCollectDiagnosticsPackage = { - storageAccountBlobUrl: - "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCollectDiagnosticsPackageAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - collectDiagnosticsPackageFromPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts deleted file mode 100644 index 94ba54de44c9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a packet core control plane. - * - * @summary Creates or updates a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlane = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - authenticationType: "AAD", - httpsServerCertificate: { - certificateUrl: - "https://contosovault.vault.azure.net/certificates/ingress" - } - }, - location: "eastus", - platform: { - type: "AKS-HCI", - azureStackEdgeDevice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice" - }, - connectedCluster: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster" - }, - customLocation: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation" - } - }, - sites: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite" - } - ], - sku: "G0", - ueMtu: 1600, - version: "0.2.0" - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesDeleteSample.ts deleted file mode 100644 index 49f71c97173d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified packet core control plane. - * - * @summary Deletes the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesGetSample.ts deleted file mode 100644 index 3ea686ce575a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core control plane. - * - * @summary Gets information about the specified packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.get( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts deleted file mode 100644 index e90c72ed77b0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a resource group. - * - * @summary Lists all the packet core control planes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts deleted file mode 100644 index fb15bca1e86c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core control planes in a subscription. - * - * @summary Lists all the packet core control planes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreControlPlanes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreControlPlanesInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesReinstallSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesReinstallSample.ts deleted file mode 100644 index 53c444c08243..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesReinstallSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * - * @summary Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json - */ -async function reinstallPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginReinstallAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - reinstallPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesRollbackSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesRollbackSample.ts deleted file mode 100644 index e5cc4c226ddd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesRollbackSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * - * @summary Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json - */ -async function rollbackPacketCoreControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.beginRollbackAndWait( - resourceGroupName, - packetCoreControlPlaneName - ); - console.log(result); -} - -async function main() { - rollbackPacketCoreControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts deleted file mode 100644 index f39687caf496..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates packet core control planes tags. - * - * @summary Updates packet core control planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreControlPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreControlPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts deleted file mode 100644 index edd571d456d6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreDataPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * - * @summary Creates or updates a packet core data plane. Must be created in the same location as its parent packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters: PacketCoreDataPlane = { - location: "eastus", - userPlaneAccessInterface: { name: "N3" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginCreateOrUpdateAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - createPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesDeleteSample.ts deleted file mode 100644 index 2a2549793ced..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified packet core data plane. - * - * @summary Deletes the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.beginDeleteAndWait( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - deletePacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesGetSample.ts deleted file mode 100644 index d11c47f32dd7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified packet core data plane. - * - * @summary Gets information about the specified packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.get( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName - ); - console.log(result); -} - -async function main() { - getPacketCoreDataPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts deleted file mode 100644 index 241fc5e80d5a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all the packet core data planes associated with a packet core control plane. - * - * @summary Lists all the packet core data planes associated with a packet core control plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.packetCoreDataPlanes.listByPacketCoreControlPlane( - resourceGroupName, - packetCoreControlPlaneName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPacketCoreDataPlanesInAControlPlane(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts deleted file mode 100644 index 0e9f7219fb45..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates packet core data planes tags. - * - * @summary Updates packet core data planes tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const packetCoreControlPlaneName = "testPacketCoreCP"; - const packetCoreDataPlaneName = "testPacketCoreDP"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.packetCoreDataPlanes.updateTags( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - parameters - ); - console.log(result); -} - -async function main() { - updatePacketCoreDataPlaneTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesCreateOrUpdateSample.ts deleted file mode 100644 index 2da2d56bdfbd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Service, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a service. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a service. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters: Service = { - location: "eastus", - pccRules: [ - { - ruleName: "default-rule", - rulePrecedence: 255, - ruleQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable" - }, - serviceDataFlowTemplates: [ - { - direction: "Uplink", - ports: [], - remoteIpList: ["10.3.4.0/24"], - templateName: "IP-to-server", - protocol: ["ip"] - } - ], - trafficControl: "Enabled" - } - ], - servicePrecedence: 255, - serviceQosPolicy: { - fiveQi: 9, - allocationAndRetentionPriorityLevel: 9, - maximumBitRate: { downlink: "1 Gbps", uplink: "500 Mbps" }, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - createService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesDeleteSample.ts deleted file mode 100644 index d88a2200fa0d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - deleteService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesGetSample.ts deleted file mode 100644 index 449dc95ceebb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified service. - * - * @summary Gets information about the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.get( - resourceGroupName, - mobileNetworkName, - serviceName - ); - console.log(result); -} - -async function main() { - getService(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesListByMobileNetworkSample.ts deleted file mode 100644 index 062b74b905cf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the services in a mobile network. - * - * @summary Gets all the services in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.services.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listServicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesUpdateTagsSample.ts deleted file mode 100644 index 602401786129..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/servicesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const serviceName = "TestService"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.services.updateTags( - resourceGroupName, - mobileNetworkName, - serviceName, - parameters - ); - console.log(result); -} - -async function main() { - updateServiceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsCreateOrUpdateSample.ts deleted file mode 100644 index b29f8da76579..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimGroup, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM group. - * - * @summary Creates or updates a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimGroup = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey" - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/subid/resourcegroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": {} - } - }, - location: "eastus", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - createSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsDeleteSample.ts deleted file mode 100644 index 5974e50c1dda..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM group. - * - * @summary Deletes the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.beginDeleteAndWait( - resourceGroupName, - simGroupName - ); - console.log(result); -} - -async function main() { - deleteSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsGetSample.ts deleted file mode 100644 index 7a9321529546..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM group. - * - * @summary Gets information about the specified SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.get(resourceGroupName, simGroupName); - console.log(result); -} - -async function main() { - getSimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListByResourceGroupSample.ts deleted file mode 100644 index fcb77b783ce7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a resource group. - * - * @summary Gets all the SIM groups in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInAResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListBySubscriptionSample.ts deleted file mode 100644 index c07ede93010e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsListBySubscriptionSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM groups in a subscription. - * - * @summary Gets all the SIM groups in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simGroups.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimGroupsInASubscription(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsUpdateTagsSample.ts deleted file mode 100644 index 41f82587eef1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simGroupsUpdateTagsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simGroups.updateTags( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimGroupTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b31d5132bded..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimPolicy, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters: SimPolicy = { - defaultSlice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - location: "eastus", - registrationTimer: 3240, - sliceConfigurations: [ - { - dataNetworkConfigurations: [ - { - fiveQi: 9, - additionalAllowedSessionTypes: [], - allocationAndRetentionPriorityLevel: 9, - allowedServices: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService" - } - ], - dataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork" - }, - defaultSessionType: "IPv4", - maximumNumberOfBufferedPackets: 200, - preemptionCapability: "NotPreempt", - preemptionVulnerability: "Preemptable", - sessionAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" } - } - ], - defaultDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - } - } - ], - ueAmbr: { downlink: "1 Gbps", uplink: "500 Mbps" } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - createSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesDeleteSample.ts deleted file mode 100644 index 3623dc896150..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM policy. - * - * @summary Deletes the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - deleteSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesGetSample.ts deleted file mode 100644 index 8888aca9e9bf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM policy. - * - * @summary Gets information about the specified SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.get( - resourceGroupName, - mobileNetworkName, - simPolicyName - ); - console.log(result); -} - -async function main() { - getSimPolicy(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesListByMobileNetworkSample.ts deleted file mode 100644 index d6a3b11cc289..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIM policies in a mobile network. - * - * @summary Gets all the SIM policies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.simPolicies.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSimPoliciesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesUpdateTagsSample.ts deleted file mode 100644 index 59f5c0deaa28..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simPoliciesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const simPolicyName = "testPolicy"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.simPolicies.updateTags( - resourceGroupName, - mobileNetworkName, - simPolicyName, - parameters - ); - console.log(result); -} - -async function main() { - updateSimPolicyTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkDeleteSample.ts deleted file mode 100644 index 420dbdff1c1e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimDeleteList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk delete SIMs from a SIM group. - * - * @summary Bulk delete SIMs from a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json - */ -async function bulkDeleteSiMSFromASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const parameters: SimDeleteList = { sims: ["testSim", "testSim2"] }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkDeleteAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkDeleteSiMSFromASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadEncryptedSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadEncryptedSample.ts deleted file mode 100644 index e531847b83b1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadEncryptedSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - EncryptedSimUploadList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @summary Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json - */ -async function bulkUploadEncryptedSiMSToASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: EncryptedSimUploadList = { - azureKeyIdentifier: 1, - encryptedTransportKey: "ABC123", - signedTransportKey: "ABC123", - sims: [ - { - name: "testSim", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }, - { - name: "testSim2", - deviceType: "Video camera", - encryptedCredentials: "ABC123", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.2" } - } - ] - } - ], - vendorKeyFingerprint: "ABC123", - version: 1 - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadEncryptedAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadEncryptedSiMSToASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadSample.ts deleted file mode 100644 index 360007383c52..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsBulkUploadSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SimUploadList, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Bulk upload SIMs to a SIM group. - * - * @summary Bulk upload SIMs to a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json - */ -async function bulkUploadSiMSInASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimUploadList = { - sims: [ - { - name: "testSim", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }, - { - name: "testSim2", - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000001", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.2" } - } - ] - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginBulkUploadAndWait( - resourceGroupName, - simGroupName, - parameters - ); - console.log(result); -} - -async function main() { - bulkUploadSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsCreateOrUpdateSample.ts deleted file mode 100644 index c89f9eb7af9e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsCreateOrUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Sim, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a SIM. - * - * @summary Creates or updates a SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const parameters: Sim = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - operatorKeyCode: "00000000000000000000000000000000", - simPolicy: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy" - }, - staticIpConfiguration: [ - { - attachedDataNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork" - }, - slice: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice" - }, - staticIp: { ipv4Address: "2.4.0.1" } - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginCreateOrUpdateAndWait( - resourceGroupName, - simGroupName, - simName, - parameters - ); - console.log(result); -} - -async function main() { - createSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsDeleteSample.ts deleted file mode 100644 index 7594ebc087c3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait( - resourceGroupName, - simGroupName, - simName - ); - console.log(result); -} - -async function main() { - deleteSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsGetSample.ts deleted file mode 100644 index b9a1c49588aa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified SIM. - * - * @summary Gets information about the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "testResourceGroupName"; - const simGroupName = "testSimGroup"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get( - resourceGroupName, - simGroupName, - simName - ); - console.log(result); -} - -async function main() { - getSim(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsListByGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsListByGroupSample.ts deleted file mode 100644 index cf9dfb280889..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/simsListByGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all the SIMs in a SIM group. - * - * @summary Gets all the SIMs in a SIM group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const simGroupName = "testSimGroup"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listByGroup( - resourceGroupName, - simGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listSiMSInASimGroup(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesCreateOrUpdateSample.ts deleted file mode 100644 index b179193e3e4f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Site, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: Site = { location: "testLocation" }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - createMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesDeleteSample.ts deleted file mode 100644 index 7dfa11437e35..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * - * @summary Deletes the specified mobile network site. This will also delete any network functions that are a part of this site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - deleteMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesGetSample.ts deleted file mode 100644 index ec161f781273..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified mobile network site. - * - * @summary Gets information about the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.get( - resourceGroupName, - mobileNetworkName, - siteName - ); - console.log(result); -} - -async function main() { - getMobileNetworkSite(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesListByMobileNetworkSample.ts deleted file mode 100644 index 76a412869c34..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all sites in the mobile network. - * - * @summary Lists all sites in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sites.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMobileNetworkSitesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesUpdateTagsSample.ts deleted file mode 100644 index 744a383a9965..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/sitesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.updateTags( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -async function main() { - updateMobileNetworkSiteTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesCreateOrUpdateSample.ts deleted file mode 100644 index fd31b3910902..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Slice, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * - * @summary Creates or updates a network slice. Must be created in the same location as its parent mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters: Slice = { - description: "myFavouriteSlice", - location: "eastus", - snssai: { sd: "1abcde", sst: 1 } - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - createNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesDeleteSample.ts deleted file mode 100644 index 1449d3596972..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the specified network slice. - * - * @summary Deletes the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.beginDeleteAndWait( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - deleteNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesGetSample.ts deleted file mode 100644 index 28f4267ea223..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets information about the specified network slice. - * - * @summary Gets information about the specified network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.get( - resourceGroupName, - mobileNetworkName, - sliceName - ); - console.log(result); -} - -async function main() { - getNetworkSlice(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesListByMobileNetworkSample.ts deleted file mode 100644 index 78adb935b053..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesListByMobileNetworkSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all slices in the mobile network. - * - * @summary Lists all slices in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.slices.listByMobileNetwork( - resourceGroupName, - mobileNetworkName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listNetworkSlicesInAMobileNetwork(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesUpdateTagsSample.ts deleted file mode 100644 index d0970a3bb8a5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/src/slicesUpdateTagsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = - process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const sliceName = "testSlice"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.slices.updateTags( - resourceGroupName, - mobileNetworkName, - sliceName, - parameters - ); - console.log(result); -} - -async function main() { - updateNetworkSliceTags(); -} - -main().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/tsconfig.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v2/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/lroImpl.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/lroImpl.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts index 546f6c1f6a47..464e0465df2a 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts @@ -17,8 +17,10 @@ import * as coreAuth from "@azure/core-auth"; import { AttachedDataNetworksImpl, DataNetworksImpl, + DiagnosticsPackagesImpl, MobileNetworksImpl, OperationsImpl, + PacketCapturesImpl, PacketCoreControlPlanesImpl, PacketCoreControlPlaneVersionsImpl, PacketCoreDataPlanesImpl, @@ -32,8 +34,10 @@ import { import { AttachedDataNetworks, DataNetworks, + DiagnosticsPackages, MobileNetworks, Operations, + PacketCaptures, PacketCoreControlPlanes, PacketCoreControlPlaneVersions, PacketCoreDataPlanes, @@ -48,25 +52,41 @@ import { MobileNetworkManagementClientOptionalParams } from "./models"; export class MobileNetworkManagementClient extends coreClient.ServiceClient { $host: string; - subscriptionId: string; + subscriptionId?: string; apiVersion: string; /** * Initializes a new instance of the MobileNetworkManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MobileNetworkManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: MobileNetworkManagementClientOptionalParams + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: + | MobileNetworkManagementClientOptionalParams + | string, + options?: MobileNetworkManagementClientOptionalParams ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -78,7 +98,7 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mobilenetwork/2.0.1`; + const packageDetails = `azsdk-js-arm-mobilenetwork/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -131,11 +151,13 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-11-01"; + this.apiVersion = options.apiVersion || "2023-06-01"; this.attachedDataNetworks = new AttachedDataNetworksImpl(this); this.dataNetworks = new DataNetworksImpl(this); + this.diagnosticsPackages = new DiagnosticsPackagesImpl(this); this.mobileNetworks = new MobileNetworksImpl(this); this.operations = new OperationsImpl(this); + this.packetCaptures = new PacketCapturesImpl(this); this.packetCoreControlPlanes = new PacketCoreControlPlanesImpl(this); this.packetCoreControlPlaneVersions = new PacketCoreControlPlaneVersionsImpl( this @@ -180,8 +202,10 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { attachedDataNetworks: AttachedDataNetworks; dataNetworks: DataNetworks; + diagnosticsPackages: DiagnosticsPackages; mobileNetworks: MobileNetworks; operations: Operations; + packetCaptures: PacketCaptures; packetCoreControlPlanes: PacketCoreControlPlanes; packetCoreControlPlaneVersions: PacketCoreControlPlaneVersions; packetCoreDataPlanes: PacketCoreDataPlanes; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts index c28fe5375832..3613b664658a 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts @@ -120,7 +120,7 @@ export interface PinholeTimeouts { /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -185,6 +185,17 @@ export interface DataNetworkListResult { readonly nextLink?: string; } +/** Response for diagnostics package API service call. */ +export interface DiagnosticsPackageListResult { + /** A list of diagnostics packages under a packet core control plane. */ + value?: DiagnosticsPackage[]; + /** + * The URL to get the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** Public land mobile network (PLMN) ID. */ export interface PlmnId { /** Mobile country code (MCC). */ @@ -246,12 +257,63 @@ export interface OperationDisplay { description?: string; } +/** The current status of an async operation. */ +export interface AsyncOperationStatus { + /** Fully qualified ID for the async operation. */ + id?: string; + /** Name of the async operation. */ + name?: string; + /** The operation status. */ + status: string; + /** Fully qualified ID for the resource that this async operation status relates to. */ + resourceId?: string; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** Percentage of the operation that is complete. */ + percentComplete?: number; + /** Properties returned by the resource provider on a successful operation */ + properties?: Record; + /** If present, details of the operation error. */ + error?: ErrorDetail; +} + +/** Response for packet capture API service call. */ +export interface PacketCaptureListResult { + /** A list of packet capture sessions under a packet core control plane. */ + value?: PacketCapture[]; + /** + * The URL to get the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** The installation state of the packet core. */ export interface Installation { - /** Installation state */ - state?: InstallationState; - /** A reference to an in-progress installation operation */ - operation?: AsyncOperationId; + /** The desired installation state */ + desiredState?: DesiredInstallationState; + /** + * Installation state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: InstallationState; + /** + * Whether a reinstall of the packet core is required to pick up the latest configuration changes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reinstallRequired?: ReinstallRequired; + /** + * Reason(s) for the current installation state of the packet core. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reasons?: InstallationReason[]; + /** + * A reference to an in-progress installation operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: AsyncOperationId; } /** Reference to an Azure Async Operation ID. */ @@ -342,19 +404,15 @@ export interface CertificateProvisioning { readonly reason?: string; } -/** Managed service identity (system assigned and/or user assigned identities) */ +/** Configuration for uploading packet core diagnostics. */ +export interface DiagnosticsUploadConfiguration { + /** The Storage Account Container URL to upload diagnostics to. */ + storageAccountContainerUrl: string; +} + +/** Managed service identity (User assigned identity) */ export interface ManagedServiceIdentity { - /** - * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + /** Type of managed service identity (currently only UserAssigned allowed). */ type: ManagedServiceIdentityType; /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; @@ -374,6 +432,14 @@ export interface UserAssignedIdentity { readonly clientId?: string; } +/** Identity and Tags object for patch operations. */ +export interface IdentityAndTagsObject { + /** The managed service identity associated with this resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + /** Response for packet core control planes API service call. */ export interface PacketCoreControlPlaneListResult { /** A list of packet core control planes in a resource group. */ @@ -385,28 +451,6 @@ export interface PacketCoreControlPlaneListResult { readonly nextLink?: string; } -/** The current status of an async operation. */ -export interface AsyncOperationStatus { - /** Fully qualified ID for the async operation. */ - id?: string; - /** Name of the async operation. */ - name?: string; - /** The operation status. */ - status: string; - /** Fully qualified ID for the resource that this async operation status relates to. */ - resourceId?: string; - /** The start time of the operation. */ - startTime?: Date; - /** The end time of the operation. */ - endTime?: Date; - /** Percentage of the operation that is complete. */ - percentComplete?: number; - /** Properties returned by the resource provider on a successful operation */ - properties?: Record; - /** If present, details of the operation error. */ - error?: ErrorDetail; -} - /** Packet core control plane collect diagnostics package options */ export interface PacketCoreControlPlaneCollectDiagnosticsPackage { /** The Storage Account Blob URL to upload the diagnostics package to. */ @@ -453,7 +497,7 @@ export interface PacketCoreDataPlaneListResult { /** QoS policy */ export interface QosPolicy { - /** QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition of which are the GBR 5QI values. */ + /** 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition the 5QI values. */ fiveQi?: number; /** QoS Flow allocation and retention priority (ARP) level. Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` and `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then `5qi` is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ allocationAndRetentionPriorityLevel?: number; @@ -763,7 +807,7 @@ export interface DataNetworkConfiguration { dataNetwork: DataNetworkResourceId; /** Aggregate maximum bit rate across all non-GBR QoS flows of a given PDU session. See 3GPP TS23.501 section 5.7.2.6 for a full description of the Session-AMBR. */ sessionAmbr: Ambr; - /** Default QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition of which are the GBR 5QI values. */ + /** Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition the 5QI values. */ fiveQi?: number; /** Default QoS Flow allocation and retention priority (ARP) level. Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` and `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then `5qi` is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ allocationAndRetentionPriorityLevel?: number; @@ -815,6 +859,18 @@ export interface SiteListResult { readonly nextLink?: string; } +/** The packet core to delete under a site. */ +export interface SiteDeletePacketCore { + /** Reference to an packet core control plane resource. */ + packetCore?: PacketCoreControlPlaneResourceId; +} + +/** Reference to an packet core control plane resource. */ +export interface PacketCoreControlPlaneResourceId { + /** Packet core control plane resource ID. */ + id: string; +} + /** Single-network slice selection assistance information (S-NSSAI). */ export interface Snssai { /** Slice/service type (SST). */ @@ -948,19 +1004,21 @@ export interface PacketCoreControlPlane extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** - * The installation state of the packet core control plane resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly installation?: Installation; + /** The installation state of the packet core control plane resource. */ + installation?: Installation; /** Site(s) under which this packet core control plane should be deployed. The sites must be in the same location as the packet core control plane. */ sites: SiteResourceId[]; /** The platform where the packet core is deployed. */ platform: PlatformConfiguration; /** The core network technology generation (5G core or EPC / 4G core). */ coreNetworkTechnology?: CoreNetworkType; - /** The version of the packet core software that is deployed. */ + /** The desired version of the packet core software. */ version?: string; + /** + * The currently installed version of the packet core software. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly installedVersion?: string; /** * The previous version of the packet core software that was deployed. Used when performing the rollback action. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -974,6 +1032,8 @@ export interface PacketCoreControlPlane extends TrackedResource { ueMtu?: number; /** The kubernetes ingress configuration to control access to packet core diagnostics over local APIs. */ localDiagnosticsAccess: LocalDiagnosticsAccessConfiguration; + /** Configuration for uploading packet core diagnostics */ + diagnosticsUpload?: DiagnosticsUploadConfiguration; /** Settings to allow interoperability with third party components e.g. RANs and UEs. */ interopSettings?: Record; } @@ -1039,7 +1099,7 @@ export interface SimPolicy extends TrackedResource { defaultSlice: SliceResourceId; /** RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an optional setting and by default is unspecified. */ rfspIndex?: number; - /** Interval for the UE periodic registration update procedure, in seconds. */ + /** UE periodic registration update timer (5G) or UE periodic tracking area update timer (4G), in seconds. */ registrationTimer?: number; /** The allowed slices and the settings to use for them. The list must not contain duplicate items and must contain at least one item. */ sliceConfigurations: SliceConfiguration[]; @@ -1072,6 +1132,57 @@ export interface Slice extends TrackedResource { description?: string; } +/** Diagnostics package resource. */ +export interface DiagnosticsPackage extends ProxyResource { + /** + * The provisioning state of the diagnostics package resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The status of the diagnostics package collection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: DiagnosticsPackageStatus; + /** + * The reason for the current state of the diagnostics package collection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reason?: string; +} + +/** Packet capture session resource. */ +export interface PacketCapture extends ProxyResource { + /** + * The provisioning state of the packet capture session resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The status of the packet capture session. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: PacketCaptureStatus; + /** + * The reason the current packet capture session state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reason?: string; + /** + * The start time of the packet capture session. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly captureStartTime?: Date; + /** List of network interfaces to capture on. */ + networkInterfaces?: string[]; + /** Number of bytes captured per packet, the remaining bytes are truncated. The default "0" means the entire packet is captured. */ + bytesToCapturePerPacket?: number; + /** Maximum size of the capture output. */ + totalBytesPerSession?: number; + /** Maximum duration of the capture session in seconds. */ + timeLimitInSeconds?: number; +} + /** Packet core control plane version resource. */ export interface PacketCoreControlPlaneVersion extends ProxyResource { /** @@ -1203,6 +1314,72 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link DiagnosticsPackageStatus} that the service accepts. */ +export enum KnownDiagnosticsPackageStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** Collecting */ + Collecting = "Collecting", + /** Collected */ + Collected = "Collected", + /** Error */ + Error = "Error" +} + +/** + * Defines values for DiagnosticsPackageStatus. \ + * {@link KnownDiagnosticsPackageStatus} can be used interchangeably with DiagnosticsPackageStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **Collecting** \ + * **Collected** \ + * **Error** + */ +export type DiagnosticsPackageStatus = string; + +/** Known values of {@link PacketCaptureStatus} that the service accepts. */ +export enum KnownPacketCaptureStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** Running */ + Running = "Running", + /** Stopped */ + Stopped = "Stopped", + /** Error */ + Error = "Error" +} + +/** + * Defines values for PacketCaptureStatus. \ + * {@link KnownPacketCaptureStatus} can be used interchangeably with PacketCaptureStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **Running** \ + * **Stopped** \ + * **Error** + */ +export type PacketCaptureStatus = string; + +/** Known values of {@link DesiredInstallationState} that the service accepts. */ +export enum KnownDesiredInstallationState { + /** Don't install the packet core. */ + Uninstalled = "Uninstalled", + /** Install the packet core. */ + Installed = "Installed" +} + +/** + * Defines values for DesiredInstallationState. \ + * {@link KnownDesiredInstallationState} can be used interchangeably with DesiredInstallationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Uninstalled**: Don't install the packet core. \ + * **Installed**: Install the packet core. + */ +export type DesiredInstallationState = string; + /** Known values of {@link InstallationState} that the service accepts. */ export enum KnownInstallationState { /** The packet core is uninstalled. */ @@ -1242,6 +1419,45 @@ export enum KnownInstallationState { */ export type InstallationState = string; +/** Known values of {@link ReinstallRequired} that the service accepts. */ +export enum KnownReinstallRequired { + /** A reinstall of the packet core is required. */ + Required = "Required", + /** A reinstall of the packet core is not required. */ + NotRequired = "NotRequired" +} + +/** + * Defines values for ReinstallRequired. \ + * {@link KnownReinstallRequired} can be used interchangeably with ReinstallRequired, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Required**: A reinstall of the packet core is required. \ + * **NotRequired**: A reinstall of the packet core is not required. + */ +export type ReinstallRequired = string; + +/** Known values of {@link InstallationReason} that the service accepts. */ +export enum KnownInstallationReason { + /** The mobile network does not have any applicable configured slices. */ + NoSlices = "NoSlices", + /** There is no configured data plane for this packet core. */ + NoPacketCoreDataPlane = "NoPacketCoreDataPlane", + /** The packet core has no attached data networks. */ + NoAttachedDataNetworks = "NoAttachedDataNetworks" +} + +/** + * Defines values for InstallationReason. \ + * {@link KnownInstallationReason} can be used interchangeably with InstallationReason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NoSlices**: The mobile network does not have any applicable configured slices. \ + * **NoPacketCoreDataPlane**: There is no configured data plane for this packet core. \ + * **NoAttachedDataNetworks**: The packet core has no attached data networks. + */ +export type InstallationReason = string; + /** Known values of {@link PlatformType} that the service accepts. */ export enum KnownPlatformType { /** If this option is chosen, you must set one of "azureStackEdgeDevice", "connectedCluster" or "customLocation". If multiple are set, they must be consistent with each other. */ @@ -1262,16 +1478,12 @@ export type PlatformType = string; /** Known values of {@link BillingSku} that the service accepts. */ export enum KnownBillingSku { - /** 100 Mbps, 20 active SIMs plan */ + /** 100 Mbps, 20 active SIMs plan, 2 RANs */ G0 = "G0", - /** 1 Gbps, 100 active SIMs plan */ + /** 1 Gbps, 100 active SIMs plan, 5 RANs */ G1 = "G1", - /** 2 Gbps, 200 active SIMs plan */ + /** 2 Gbps, 200 active SIMs plan, 10 RANs */ G2 = "G2", - /** 3 Gbps, 300 active SIMs plan */ - G3 = "G3", - /** 4 Gbps, 400 active SIMs plan */ - G4 = "G4", /** 5 Gbps, 500 active SIMs plan */ G5 = "G5", /** 10 Gbps, 1000 active SIMs plan */ @@ -1283,11 +1495,9 @@ export enum KnownBillingSku { * {@link KnownBillingSku} can be used interchangeably with BillingSku, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **G0**: 100 Mbps, 20 active SIMs plan \ - * **G1**: 1 Gbps, 100 active SIMs plan \ - * **G2**: 2 Gbps, 200 active SIMs plan \ - * **G3**: 3 Gbps, 300 active SIMs plan \ - * **G4**: 4 Gbps, 400 active SIMs plan \ + * **G0**: 100 Mbps, 20 active SIMs plan, 2 RANs \ + * **G1**: 1 Gbps, 100 active SIMs plan, 5 RANs \ + * **G2**: 2 Gbps, 200 active SIMs plan, 10 RANs \ * **G5**: 5 Gbps, 500 active SIMs plan \ * **G10**: 10 Gbps, 1000 active SIMs plan */ @@ -1336,12 +1546,8 @@ export type CertificateProvisioningState = string; export enum KnownManagedServiceIdentityType { /** None */ None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" + UserAssigned = "UserAssigned" } /** @@ -1350,9 +1556,7 @@ export enum KnownManagedServiceIdentityType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **None** \ - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned,UserAssigned** + * **UserAssigned** */ export type ManagedServiceIdentityType = string; @@ -1566,7 +1770,7 @@ export enum KnownPduSessionType { */ export type PduSessionType = string; /** Defines values for CoreNetworkType. */ -export type CoreNetworkType = "5GC" | "EPC"; +export type CoreNetworkType = "5GC" | "EPC" | "EPC + 5GC"; /** Optional parameters. */ export interface AttachedDataNetworksDeleteOptionalParams @@ -1666,6 +1870,48 @@ export interface DataNetworksListByMobileNetworkNextOptionalParams /** Contains response data for the listByMobileNetworkNext operation. */ export type DataNetworksListByMobileNetworkNextResponse = DataNetworkListResult; +/** Optional parameters. */ +export interface DiagnosticsPackagesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type DiagnosticsPackagesCreateOrUpdateResponse = DiagnosticsPackage; + +/** Optional parameters. */ +export interface DiagnosticsPackagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DiagnosticsPackagesGetResponse = DiagnosticsPackage; + +/** Optional parameters. */ +export interface DiagnosticsPackagesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByPacketCoreControlPlane operation. */ +export type DiagnosticsPackagesListByPacketCoreControlPlaneResponse = DiagnosticsPackageListResult; + +/** Optional parameters. */ +export interface DiagnosticsPackagesListByPacketCoreControlPlaneNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByPacketCoreControlPlaneNext operation. */ +export type DiagnosticsPackagesListByPacketCoreControlPlaneNextResponse = DiagnosticsPackageListResult; + /** Optional parameters. */ export interface MobileNetworksDeleteOptionalParams extends coreClient.OperationOptions { @@ -1743,6 +1989,60 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationList; +/** Optional parameters. */ +export interface PacketCapturesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type PacketCapturesCreateOrUpdateResponse = PacketCapture; + +/** Optional parameters. */ +export interface PacketCapturesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PacketCapturesGetResponse = PacketCapture; + +/** Optional parameters. */ +export interface PacketCapturesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface PacketCapturesStopOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the stop operation. */ +export type PacketCapturesStopResponse = AsyncOperationStatus; + +/** Optional parameters. */ +export interface PacketCapturesListByPacketCoreControlPlaneOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByPacketCoreControlPlane operation. */ +export type PacketCapturesListByPacketCoreControlPlaneResponse = PacketCaptureListResult; + +/** Optional parameters. */ +export interface PacketCapturesListByPacketCoreControlPlaneNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByPacketCoreControlPlaneNext operation. */ +export type PacketCapturesListByPacketCoreControlPlaneNextResponse = PacketCaptureListResult; + /** Optional parameters. */ export interface PacketCoreControlPlanesDeleteOptionalParams extends coreClient.OperationOptions { @@ -1856,6 +2156,20 @@ export interface PacketCoreControlPlaneVersionsListOptionalParams /** Contains response data for the list operation. */ export type PacketCoreControlPlaneVersionsListResponse = PacketCoreControlPlaneVersionListResult; +/** Optional parameters. */ +export interface PacketCoreControlPlaneVersionsGetBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getBySubscription operation. */ +export type PacketCoreControlPlaneVersionsGetBySubscriptionResponse = PacketCoreControlPlaneVersion; + +/** Optional parameters. */ +export interface PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type PacketCoreControlPlaneVersionsListBySubscriptionResponse = PacketCoreControlPlaneVersionListResult; + /** Optional parameters. */ export interface PacketCoreControlPlaneVersionsListNextOptionalParams extends coreClient.OperationOptions {} @@ -1863,6 +2177,13 @@ export interface PacketCoreControlPlaneVersionsListNextOptionalParams /** Contains response data for the listNext operation. */ export type PacketCoreControlPlaneVersionsListNextResponse = PacketCoreControlPlaneVersionListResult; +/** Optional parameters. */ +export interface PacketCoreControlPlaneVersionsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type PacketCoreControlPlaneVersionsListBySubscriptionNextResponse = PacketCoreControlPlaneVersionListResult; + /** Optional parameters. */ export interface PacketCoreDataPlanesDeleteOptionalParams extends coreClient.OperationOptions { @@ -2189,6 +2510,15 @@ export interface SitesListByMobileNetworkOptionalParams /** Contains response data for the listByMobileNetwork operation. */ export type SitesListByMobileNetworkResponse = SiteListResult; +/** Optional parameters. */ +export interface SitesDeletePacketCoreOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface SitesListByMobileNetworkNextOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts index 22e6894f2fc8..d232895d8637 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts @@ -453,6 +453,34 @@ export const DataNetworkListResult: coreClient.CompositeMapper = { } }; +export const DiagnosticsPackageListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsPackageListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticsPackage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const PlmnId: coreClient.CompositeMapper = { type: { name: "Composite", @@ -601,17 +629,144 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; +export const AsyncOperationStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AsyncOperationStatus", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + required: true, + type: { + name: "String" + } + }, + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + percentComplete: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "percentComplete", + type: { + name: "Number" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const PacketCaptureListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PacketCaptureListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PacketCapture" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const Installation: coreClient.CompositeMapper = { type: { name: "Composite", className: "Installation", modelProperties: { + desiredState: { + serializedName: "desiredState", + type: { + name: "String" + } + }, state: { serializedName: "state", + readOnly: true, + type: { + name: "String" + } + }, + reinstallRequired: { + serializedName: "reinstallRequired", + readOnly: true, type: { name: "String" } }, + reasons: { + constraints: { + UniqueItems: true + }, + serializedName: "reasons", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, operation: { serializedName: "operation", type: { @@ -875,25 +1030,27 @@ export const CertificateProvisioning: coreClient.CompositeMapper = { } }; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { +export const DiagnosticsUploadConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServiceIdentity", + className: "DiagnosticsUploadConfiguration", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, + storageAccountContainerUrl: { + serializedName: "storageAccountContainerUrl", + required: true, type: { - name: "Uuid" + name: "String" } - }, + } + } + } +}; + +export const ManagedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServiceIdentity", + modelProperties: { type: { serializedName: "type", required: true, @@ -937,6 +1094,29 @@ export const UserAssignedIdentity: coreClient.CompositeMapper = { } }; +export const IdentityAndTagsObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentityAndTagsObject", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + export const PacketCoreControlPlaneListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -965,76 +1145,6 @@ export const PacketCoreControlPlaneListResult: coreClient.CompositeMapper = { } }; -export const AsyncOperationStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AsyncOperationStatus", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - required: true, - type: { - name: "String" - } - }, - resourceId: { - serializedName: "resourceId", - type: { - name: "String" - } - }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime" - } - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime" - } - }, - percentComplete: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 - }, - serializedName: "percentComplete", - type: { - name: "Number" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } -}; - export const PacketCoreControlPlaneCollectDiagnosticsPackage: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1274,6 +1384,7 @@ export const PccRuleConfiguration: coreClient.CompositeMapper = { serviceDataFlowTemplates: { constraints: { MinItems: 1, + MaxItems: 15, UniqueItems: true }, serializedName: "serviceDataFlowTemplates", @@ -2315,6 +2426,43 @@ export const SiteListResult: coreClient.CompositeMapper = { } }; +export const SiteDeletePacketCore: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SiteDeletePacketCore", + modelProperties: { + packetCore: { + serializedName: "packetCore", + type: { + name: "Composite", + className: "PacketCoreControlPlaneResourceId" + } + } + } + } +}; + +export const PacketCoreControlPlaneResourceId: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PacketCoreControlPlaneResourceId", + modelProperties: { + id: { + constraints: { + Pattern: new RegExp( + "^\\/[sS][uU][bB][sS][cC][rR][iI][pP][tT][iI][oO][nN][sS]\\/[^/?#]+\\/[rR][eE][sS][oO][uU][rR][cC][eE][gG][rR][oO][uU][pP][sS]\\/[^/?#]+\\/[pP][rR][oO][vV][iI][dD][eE][rR][sS]\\/[mM][iI][cC][rR][oO][sS][oO][fF][tT]\\.[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK]\\/[pP][aA][cC][kK][eE][tT][cC][oO][rR][eE][cC][oO][nN][tT][rR][oO][lL][pP][lL][aA][nN][eE][sS]\\/[^/?#]+$" + ) + }, + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const Snssai: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2726,7 +2874,7 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { serializedName: "properties.coreNetworkTechnology", type: { name: "Enum", - allowedValues: ["5GC", "EPC"] + allowedValues: ["5GC", "EPC", "EPC + 5GC"] } }, version: { @@ -2735,6 +2883,13 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { name: "String" } }, + installedVersion: { + serializedName: "properties.installedVersion", + readOnly: true, + type: { + name: "String" + } + }, rollbackVersion: { serializedName: "properties.rollbackVersion", readOnly: true, @@ -2774,6 +2929,13 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { className: "LocalDiagnosticsAccessConfiguration" } }, + diagnosticsUpload: { + serializedName: "properties.diagnosticsUpload", + type: { + name: "Composite", + className: "DiagnosticsUploadConfiguration" + } + }, interopSettings: { serializedName: "properties.interopSettings", type: { @@ -3035,6 +3197,123 @@ export const Slice: coreClient.CompositeMapper = { } }; +export const DiagnosticsPackage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsPackage", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + reason: { + serializedName: "properties.reason", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PacketCapture: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PacketCapture", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + reason: { + serializedName: "properties.reason", + readOnly: true, + type: { + name: "String" + } + }, + captureStartTime: { + serializedName: "properties.captureStartTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + networkInterfaces: { + constraints: { + MinItems: 1, + UniqueItems: true + }, + serializedName: "properties.networkInterfaces", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + bytesToCapturePerPacket: { + defaultValue: 0, + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 0 + }, + serializedName: "properties.bytesToCapturePerPacket", + type: { + name: "Number" + } + }, + totalBytesPerSession: { + defaultValue: 67108864, + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 0 + }, + serializedName: "properties.totalBytesPerSession", + type: { + name: "Number" + } + }, + timeLimitInSeconds: { + defaultValue: 18000, + constraints: { + InclusiveMaximum: 18000, + InclusiveMinimum: 0 + }, + serializedName: "properties.timeLimitInSeconds", + type: { + name: "Number" + } + } + } + } +}; + export const PacketCoreControlPlaneVersion: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts index 6e32f982707d..13ababd43e05 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts @@ -16,7 +16,9 @@ import { TagsObject as TagsObjectMapper, DataNetwork as DataNetworkMapper, MobileNetwork as MobileNetworkMapper, + PacketCapture as PacketCaptureMapper, PacketCoreControlPlane as PacketCoreControlPlaneMapper, + IdentityAndTagsObject as IdentityAndTagsObjectMapper, PacketCoreControlPlaneCollectDiagnosticsPackage as PacketCoreControlPlaneCollectDiagnosticsPackageMapper, PacketCoreDataPlane as PacketCoreDataPlaneMapper, Service as ServiceMapper, @@ -27,6 +29,7 @@ import { SimGroup as SimGroupMapper, SimPolicy as SimPolicyMapper, Site as SiteMapper, + SiteDeletePacketCore as SiteDeletePacketCoreMapper, Slice as SliceMapper } from "../models/mappers"; @@ -57,13 +60,10 @@ export const $host: OperationURLParameter = { export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { - constraints: { - MinLength: 1 - }, serializedName: "subscriptionId", required: true, type: { - name: "String" + name: "Uuid" } } }; @@ -133,7 +133,7 @@ export const attachedDataNetworkName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-01", + defaultValue: "2023-06-01", isConstant: true, serializedName: "api-version", type: { @@ -213,6 +213,21 @@ export const parameters2: OperationParameter = { mapper: DataNetworkMapper }; +export const diagnosticsPackageName: OperationURLParameter = { + parameterPath: "diagnosticsPackageName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_-]*$"), + MaxLength: 64 + }, + serializedName: "diagnosticsPackageName", + required: true, + type: { + name: "String" + } + } +}; + export const parameters3: OperationParameter = { parameterPath: "parameters", mapper: MobileNetworkMapper @@ -220,10 +235,35 @@ export const parameters3: OperationParameter = { export const parameters4: OperationParameter = { parameterPath: "parameters", - mapper: PacketCoreControlPlaneMapper + mapper: PacketCaptureMapper +}; + +export const packetCaptureName: OperationURLParameter = { + parameterPath: "packetCaptureName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_-]*$"), + MaxLength: 64 + }, + serializedName: "packetCaptureName", + required: true, + type: { + name: "String" + } + } }; export const parameters5: OperationParameter = { + parameterPath: "parameters", + mapper: PacketCoreControlPlaneMapper +}; + +export const parameters6: OperationParameter = { + parameterPath: "parameters", + mapper: IdentityAndTagsObjectMapper +}; + +export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: PacketCoreControlPlaneCollectDiagnosticsPackageMapper }; @@ -239,7 +279,7 @@ export const versionName: OperationURLParameter = { } }; -export const parameters6: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: PacketCoreDataPlaneMapper }; @@ -261,7 +301,7 @@ export const serviceName: OperationURLParameter = { } }; -export const parameters7: OperationParameter = { +export const parameters9: OperationParameter = { parameterPath: "parameters", mapper: ServiceMapper }; @@ -296,27 +336,27 @@ export const simName: OperationURLParameter = { } }; -export const parameters8: OperationParameter = { +export const parameters10: OperationParameter = { parameterPath: "parameters", mapper: SimMapper }; -export const parameters9: OperationParameter = { +export const parameters11: OperationParameter = { parameterPath: "parameters", mapper: SimUploadListMapper }; -export const parameters10: OperationParameter = { +export const parameters12: OperationParameter = { parameterPath: "parameters", mapper: SimDeleteListMapper }; -export const parameters11: OperationParameter = { +export const parameters13: OperationParameter = { parameterPath: "parameters", mapper: EncryptedSimUploadListMapper }; -export const parameters12: OperationParameter = { +export const parameters14: OperationParameter = { parameterPath: "parameters", mapper: SimGroupMapper }; @@ -336,7 +376,7 @@ export const simPolicyName: OperationURLParameter = { } }; -export const parameters13: OperationParameter = { +export const parameters15: OperationParameter = { parameterPath: "parameters", mapper: SimPolicyMapper }; @@ -356,11 +396,16 @@ export const siteName: OperationURLParameter = { } }; -export const parameters14: OperationParameter = { +export const parameters16: OperationParameter = { parameterPath: "parameters", mapper: SiteMapper }; +export const parameters17: OperationParameter = { + parameterPath: "parameters", + mapper: SiteDeletePacketCoreMapper +}; + export const sliceName: OperationURLParameter = { parameterPath: "sliceName", mapper: { @@ -376,7 +421,7 @@ export const sliceName: OperationURLParameter = { } }; -export const parameters15: OperationParameter = { +export const parameters18: OperationParameter = { parameterPath: "parameters", mapper: SliceMapper }; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts index 7a69690531f5..60d164021e80 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AttachedDataNetwork, AttachedDataNetworksListByPacketCoreDataPlaneNextOptionalParams, @@ -151,14 +155,14 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -191,21 +195,21 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -281,8 +285,8 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AttachedDataNetworksCreateOrUpdateResponse > > { @@ -292,7 +296,7 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -325,9 +329,9 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, @@ -335,12 +339,15 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + AttachedDataNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts index 84be12443fc6..bb995ff19db8 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DataNetwork, DataNetworksListByMobileNetworkNextOptionalParams, @@ -140,14 +144,14 @@ export class DataNetworksImpl implements DataNetworks { mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -180,15 +184,15 @@ export class DataNetworksImpl implements DataNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, dataNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, dataNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -251,8 +255,8 @@ export class DataNetworksImpl implements DataNetworks { parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataNetworksCreateOrUpdateResponse > > { @@ -262,7 +266,7 @@ export class DataNetworksImpl implements DataNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -295,21 +299,24 @@ export class DataNetworksImpl implements DataNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, dataNetworkName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DataNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/diagnosticsPackages.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/diagnosticsPackages.ts new file mode 100644 index 000000000000..2bee17514cc7 --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/diagnosticsPackages.ts @@ -0,0 +1,511 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DiagnosticsPackages } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + DiagnosticsPackage, + DiagnosticsPackagesListByPacketCoreControlPlaneNextOptionalParams, + DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams, + DiagnosticsPackagesListByPacketCoreControlPlaneResponse, + DiagnosticsPackagesCreateOrUpdateOptionalParams, + DiagnosticsPackagesCreateOrUpdateResponse, + DiagnosticsPackagesGetOptionalParams, + DiagnosticsPackagesGetResponse, + DiagnosticsPackagesDeleteOptionalParams, + DiagnosticsPackagesListByPacketCoreControlPlaneNextResponse +} from "../models"; + +/// +/** Class containing DiagnosticsPackages operations. */ +export class DiagnosticsPackagesImpl implements DiagnosticsPackages { + private readonly client: MobileNetworkManagementClient; + + /** + * Initialize a new instance of the class DiagnosticsPackages class. + * @param client Reference to the service client + */ + constructor(client: MobileNetworkManagementClient) { + this.client = client; + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * @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. + */ + public listByPacketCoreControlPlane( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByPacketCoreControlPlanePagingAll( + resourceGroupName, + packetCoreControlPlaneName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByPacketCoreControlPlanePagingPage( + resourceGroupName, + packetCoreControlPlaneName, + options, + settings + ); + } + }; + } + + private async *listByPacketCoreControlPlanePagingPage( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DiagnosticsPackagesListByPacketCoreControlPlaneResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByPacketCoreControlPlane( + resourceGroupName, + packetCoreControlPlaneName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByPacketCoreControlPlaneNext( + resourceGroupName, + packetCoreControlPlaneName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByPacketCoreControlPlanePagingAll( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByPacketCoreControlPlanePagingPage( + resourceGroupName, + packetCoreControlPlaneName, + options + )) { + yield* page; + } + } + + /** + * Creates or updates a diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DiagnosticsPackagesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DiagnosticsPackagesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets information about the specified diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + options + }, + getOperationSpec + ); + } + + /** + * Deletes the specified diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * @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. + */ + private _listByPacketCoreControlPlane( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, packetCoreControlPlaneName, options }, + listByPacketCoreControlPlaneOperationSpec + ); + } + + /** + * ListByPacketCoreControlPlaneNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param nextLink The nextLink from the previous successful call to the ListByPacketCoreControlPlane + * method. + * @param options The options parameters. + */ + private _listByPacketCoreControlPlaneNext( + resourceGroupName: string, + packetCoreControlPlaneName: string, + nextLink: string, + options?: DiagnosticsPackagesListByPacketCoreControlPlaneNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, packetCoreControlPlaneName, nextLink, options }, + listByPacketCoreControlPlaneNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsPackage + }, + 201: { + bodyMapper: Mappers.DiagnosticsPackage + }, + 202: { + bodyMapper: Mappers.DiagnosticsPackage + }, + 204: { + bodyMapper: Mappers.DiagnosticsPackage + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName, + Parameters.diagnosticsPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsPackage + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName, + Parameters.diagnosticsPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName, + Parameters.diagnosticsPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByPacketCoreControlPlaneOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsPackageListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByPacketCoreControlPlaneNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsPackageListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts index 7fa4a6da8f4f..d497e206f3f8 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts @@ -8,8 +8,10 @@ export * from "./attachedDataNetworks"; export * from "./dataNetworks"; +export * from "./diagnosticsPackages"; export * from "./mobileNetworks"; export * from "./operations"; +export * from "./packetCaptures"; export * from "./packetCoreControlPlanes"; export * from "./packetCoreControlPlaneVersions"; export * from "./packetCoreDataPlanes"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts index f366560dd2cf..ae34d06e0b6b 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { MobileNetwork, MobileNetworksListBySubscriptionNextOptionalParams, @@ -181,14 +185,14 @@ export class MobileNetworksImpl implements MobileNetworks { resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,15 +225,15 @@ export class MobileNetworksImpl implements MobileNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -284,8 +288,8 @@ export class MobileNetworksImpl implements MobileNetworks { parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MobileNetworksCreateOrUpdateResponse > > { @@ -295,7 +299,7 @@ export class MobileNetworksImpl implements MobileNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -328,15 +332,18 @@ export class MobileNetworksImpl implements MobileNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + MobileNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCaptures.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCaptures.ts new file mode 100644 index 000000000000..cf68dff2e0cd --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCaptures.ts @@ -0,0 +1,654 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { PacketCaptures } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PacketCapture, + PacketCapturesListByPacketCoreControlPlaneNextOptionalParams, + PacketCapturesListByPacketCoreControlPlaneOptionalParams, + PacketCapturesListByPacketCoreControlPlaneResponse, + PacketCapturesCreateOrUpdateOptionalParams, + PacketCapturesCreateOrUpdateResponse, + PacketCapturesGetOptionalParams, + PacketCapturesGetResponse, + PacketCapturesDeleteOptionalParams, + PacketCapturesStopOptionalParams, + PacketCapturesStopResponse, + PacketCapturesListByPacketCoreControlPlaneNextResponse +} from "../models"; + +/// +/** Class containing PacketCaptures operations. */ +export class PacketCapturesImpl implements PacketCaptures { + private readonly client: MobileNetworkManagementClient; + + /** + * Initialize a new instance of the class PacketCaptures class. + * @param client Reference to the service client + */ + constructor(client: MobileNetworkManagementClient) { + this.client = client; + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * @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. + */ + public listByPacketCoreControlPlane( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCapturesListByPacketCoreControlPlaneOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByPacketCoreControlPlanePagingAll( + resourceGroupName, + packetCoreControlPlaneName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByPacketCoreControlPlanePagingPage( + resourceGroupName, + packetCoreControlPlaneName, + options, + settings + ); + } + }; + } + + private async *listByPacketCoreControlPlanePagingPage( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCapturesListByPacketCoreControlPlaneOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PacketCapturesListByPacketCoreControlPlaneResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByPacketCoreControlPlane( + resourceGroupName, + packetCoreControlPlaneName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByPacketCoreControlPlaneNext( + resourceGroupName, + packetCoreControlPlaneName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByPacketCoreControlPlanePagingAll( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCapturesListByPacketCoreControlPlaneOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByPacketCoreControlPlanePagingPage( + resourceGroupName, + packetCoreControlPlaneName, + options + )) { + yield* page; + } + } + + /** + * Creates or updates a packet capture. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PacketCapturesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PacketCapturesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a packet capture. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets information about the specified packet capture session. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + options + }, + getOperationSpec + ); + } + + /** + * Deletes the specified packet capture. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified packet capture. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Stop a packet capture session. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + async beginStop( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PacketCapturesStopResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + options + }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller< + PacketCapturesStopResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Stop a packet capture session. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + async beginStopAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams + ): Promise { + const poller = await this.beginStop( + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * @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. + */ + private _listByPacketCoreControlPlane( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCapturesListByPacketCoreControlPlaneOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, packetCoreControlPlaneName, options }, + listByPacketCoreControlPlaneOperationSpec + ); + } + + /** + * ListByPacketCoreControlPlaneNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param nextLink The nextLink from the previous successful call to the ListByPacketCoreControlPlane + * method. + * @param options The options parameters. + */ + private _listByPacketCoreControlPlaneNext( + resourceGroupName: string, + packetCoreControlPlaneName: string, + nextLink: string, + options?: PacketCapturesListByPacketCoreControlPlaneNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, packetCoreControlPlaneName, nextLink, options }, + listByPacketCoreControlPlaneNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PacketCapture + }, + 201: { + bodyMapper: Mappers.PacketCapture + }, + 202: { + bodyMapper: Mappers.PacketCapture + }, + 204: { + bodyMapper: Mappers.PacketCapture + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName, + Parameters.packetCaptureName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCapture + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName, + Parameters.packetCaptureName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName, + Parameters.packetCaptureName + ], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}/stop", + 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, + Parameters.packetCaptureName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByPacketCoreControlPlaneOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCaptureListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByPacketCoreControlPlaneNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCaptureListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts index 6f66a5b0c05c..4b8d66a0dd34 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts @@ -18,9 +18,15 @@ import { PacketCoreControlPlaneVersionsListNextOptionalParams, PacketCoreControlPlaneVersionsListOptionalParams, PacketCoreControlPlaneVersionsListResponse, + PacketCoreControlPlaneVersionsListBySubscriptionNextOptionalParams, + PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams, + PacketCoreControlPlaneVersionsListBySubscriptionResponse, PacketCoreControlPlaneVersionsGetOptionalParams, PacketCoreControlPlaneVersionsGetResponse, - PacketCoreControlPlaneVersionsListNextResponse + PacketCoreControlPlaneVersionsGetBySubscriptionOptionalParams, + PacketCoreControlPlaneVersionsGetBySubscriptionResponse, + PacketCoreControlPlaneVersionsListNextResponse, + PacketCoreControlPlaneVersionsListBySubscriptionNextResponse } from "../models"; /// @@ -91,6 +97,60 @@ export class PacketCoreControlPlaneVersionsImpl } } + /** + * Lists all supported packet core control planes versions. + * @param options The options parameters. + */ + public listBySubscription( + options?: PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PacketCoreControlPlaneVersionsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + /** * Gets information about the specified packet core control plane version. * @param versionName The name of the packet core control plane version. @@ -116,6 +176,34 @@ export class PacketCoreControlPlaneVersionsImpl return this.client.sendOperationRequest({ options }, listOperationSpec); } + /** + * Gets information about the specified packet core control plane version. + * @param versionName The name of the packet core control plane version. + * @param options The options parameters. + */ + getBySubscription( + versionName: string, + options?: PacketCoreControlPlaneVersionsGetBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { versionName, options }, + getBySubscriptionOperationSpec + ); + } + + /** + * Lists all supported packet core control planes versions. + * @param options The options parameters. + */ + private _listBySubscription( + options?: PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + /** * ListNext * @param nextLink The nextLink from the previous successful call to the List method. @@ -130,6 +218,21 @@ export class PacketCoreControlPlaneVersionsImpl listNextOperationSpec ); } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: PacketCoreControlPlaneVersionsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -167,6 +270,44 @@ const listOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const getBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/{versionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCoreControlPlaneVersion + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.versionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCoreControlPlaneVersionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -182,3 +323,22 @@ const listNextOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCoreControlPlaneVersionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts index f056f55d735e..5f524a2c1b5b 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PacketCoreControlPlane, PacketCoreControlPlanesListBySubscriptionNextOptionalParams, @@ -28,7 +32,7 @@ import { PacketCoreControlPlanesGetResponse, PacketCoreControlPlanesCreateOrUpdateOptionalParams, PacketCoreControlPlanesCreateOrUpdateResponse, - TagsObject, + IdentityAndTagsObject, PacketCoreControlPlanesUpdateTagsOptionalParams, PacketCoreControlPlanesUpdateTagsResponse, PacketCoreControlPlanesRollbackOptionalParams, @@ -188,14 +192,14 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -228,15 +232,15 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -291,8 +295,8 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesCreateOrUpdateResponse > > { @@ -302,7 +306,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -335,15 +339,23 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreControlPlanesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -372,16 +384,16 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { } /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @param options The options parameters. */ updateTags( resourceGroupName: string, packetCoreControlPlaneName: string, - parameters: TagsObject, + parameters: IdentityAndTagsObject, options?: PacketCoreControlPlanesUpdateTagsOptionalParams ): Promise { return this.client.sendOperationRequest( @@ -430,8 +442,8 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesRollbackResponse > > { @@ -441,7 +453,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -474,15 +486,18 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, options }, - rollbackOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, options }, + spec: rollbackOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreControlPlanesRollbackResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -520,8 +535,8 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesReinstallResponse > > { @@ -531,7 +546,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -564,15 +579,18 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, options }, - reinstallOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, options }, + spec: reinstallOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreControlPlanesReinstallResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -613,10 +631,8 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams ): Promise< - PollerLike< - PollOperationState< - PacketCoreControlPlanesCollectDiagnosticsPackageResponse - >, + SimplePollerLike< + OperationState, PacketCoreControlPlanesCollectDiagnosticsPackageResponse > > { @@ -626,7 +642,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -659,15 +675,23 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, packetCoreControlPlaneName, parameters, options }, - collectDiagnosticsPackageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + packetCoreControlPlaneName, + parameters, + options + }, + spec: collectDiagnosticsPackageOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreControlPlanesCollectDiagnosticsPackageResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -798,7 +822,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -822,7 +846,7 @@ const updateTagsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters1, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -955,7 +979,7 @@ const collectDiagnosticsPackageOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts index d1843e2f83d4..a1648ce0254b 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PacketCoreDataPlane, PacketCoreDataPlanesListByPacketCoreControlPlaneNextOptionalParams, @@ -140,14 +144,14 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -180,20 +184,20 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -261,8 +265,8 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreDataPlanesCreateOrUpdateResponse > > { @@ -272,7 +276,7 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -305,21 +309,24 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PacketCoreDataPlanesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -486,7 +493,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts index ee2bf8ecf296..82b3f162eec5 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Service, ServicesListByMobileNetworkNextOptionalParams, @@ -141,14 +145,14 @@ export class ServicesImpl implements Services { mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -181,15 +185,15 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, serviceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, serviceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -254,8 +258,8 @@ export class ServicesImpl implements Services { parameters: Service, options?: ServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesCreateOrUpdateResponse > > { @@ -265,7 +269,7 @@ export class ServicesImpl implements Services { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -298,21 +302,24 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, serviceName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -479,7 +486,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts index e7db3f8a40bb..4f40e3a9699c 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { SimGroup, SimGroupsListBySubscriptionNextOptionalParams, @@ -28,7 +32,7 @@ import { SimGroupsGetResponse, SimGroupsCreateOrUpdateOptionalParams, SimGroupsCreateOrUpdateResponse, - TagsObject, + IdentityAndTagsObject, SimGroupsUpdateTagsOptionalParams, SimGroupsUpdateTagsResponse, SimGroupsListBySubscriptionNextResponse, @@ -181,14 +185,14 @@ export class SimGroupsImpl implements SimGroups { resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,15 +225,15 @@ export class SimGroupsImpl implements SimGroups { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -284,8 +288,8 @@ export class SimGroupsImpl implements SimGroups { parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimGroupsCreateOrUpdateResponse > > { @@ -295,7 +299,7 @@ export class SimGroupsImpl implements SimGroups { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -328,15 +332,18 @@ export class SimGroupsImpl implements SimGroups { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SimGroupsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -365,16 +372,16 @@ export class SimGroupsImpl implements SimGroups { } /** - * Updates SIM group tags. + * Patch SIM group resource. * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @param options The options parameters. */ updateTags( resourceGroupName: string, simGroupName: string, - parameters: TagsObject, + parameters: IdentityAndTagsObject, options?: SimGroupsUpdateTagsOptionalParams ): Promise { return this.client.sendOperationRequest( @@ -512,7 +519,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters12, + requestBody: Parameters.parameters14, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -536,7 +543,7 @@ const updateTagsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters1, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts index e747cd99859a..f1cf606c40a4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { SimPolicy, SimPoliciesListByMobileNetworkNextOptionalParams, @@ -140,14 +144,14 @@ export class SimPoliciesImpl implements SimPolicies { mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -180,15 +184,15 @@ export class SimPoliciesImpl implements SimPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, simPolicyName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, simPolicyName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -250,8 +254,8 @@ export class SimPoliciesImpl implements SimPolicies { parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimPoliciesCreateOrUpdateResponse > > { @@ -261,7 +265,7 @@ export class SimPoliciesImpl implements SimPolicies { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -294,21 +298,24 @@ export class SimPoliciesImpl implements SimPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, simPolicyName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SimPoliciesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -473,7 +480,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters13, + requestBody: Parameters.parameters15, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts index 809a016a1527..371120043a5b 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Sim, SimsListByGroupNextOptionalParams, @@ -146,14 +150,14 @@ export class SimsImpl implements Sims { simGroupName: string, simName: string, options?: SimsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -186,15 +190,15 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, simName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, simName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -256,8 +260,8 @@ export class SimsImpl implements Sims { parameters: Sim, options?: SimsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsCreateOrUpdateResponse > > { @@ -267,7 +271,7 @@ export class SimsImpl implements Sims { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -300,15 +304,18 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, simName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, simName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SimsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -369,8 +376,8 @@ export class SimsImpl implements Sims { parameters: SimUploadList, options?: SimsBulkUploadOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkUploadResponse > > { @@ -380,7 +387,7 @@ export class SimsImpl implements Sims { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -413,15 +420,18 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkUploadOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, parameters, options }, + spec: bulkUploadOperationSpec + }); + const poller = await createHttpPoller< + SimsBulkUploadResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -462,8 +472,8 @@ export class SimsImpl implements Sims { parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkDeleteResponse > > { @@ -473,7 +483,7 @@ export class SimsImpl implements Sims { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -506,15 +516,18 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkDeleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, parameters, options }, + spec: bulkDeleteOperationSpec + }); + const poller = await createHttpPoller< + SimsBulkDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -555,8 +568,8 @@ export class SimsImpl implements Sims { parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkUploadEncryptedResponse > > { @@ -566,7 +579,7 @@ export class SimsImpl implements Sims { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -599,15 +612,18 @@ export class SimsImpl implements Sims { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, simGroupName, parameters, options }, - bulkUploadEncryptedOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, simGroupName, parameters, options }, + spec: bulkUploadEncryptedOperationSpec + }); + const poller = await createHttpPoller< + SimsBulkUploadEncryptedResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -725,7 +741,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -781,7 +797,7 @@ const bulkUploadOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -814,7 +830,7 @@ const bulkDeleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -847,7 +863,7 @@ const bulkUploadEncryptedOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters13, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts index 54cd3c1bd90c..45d348e6e300 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Site, SitesListByMobileNetworkNextOptionalParams, @@ -28,6 +32,8 @@ import { TagsObject, SitesUpdateTagsOptionalParams, SitesUpdateTagsResponse, + SiteDeletePacketCore, + SitesDeletePacketCoreOptionalParams, SitesListByMobileNetworkNextResponse } from "../models"; @@ -141,14 +147,14 @@ export class SitesImpl implements Sites { mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -181,15 +187,15 @@ export class SitesImpl implements Sites { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, siteName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, siteName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -253,8 +259,8 @@ export class SitesImpl implements Sites { parameters: Site, options?: SitesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SitesCreateOrUpdateResponse > > { @@ -264,7 +270,7 @@ export class SitesImpl implements Sites { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -297,15 +303,24 @@ export class SitesImpl implements Sites { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, siteName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + mobileNetworkName, + siteName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SitesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -375,6 +390,105 @@ export class SitesImpl implements Sites { ); } + /** + * Deletes a packet core under the specified mobile network site. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param options The options parameters. + */ + async beginDeletePacketCore( + resourceGroupName: string, + mobileNetworkName: string, + siteName: string, + parameters: SiteDeletePacketCore, + options?: SitesDeletePacketCoreOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + mobileNetworkName, + siteName, + parameters, + options + }, + spec: deletePacketCoreOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a packet core under the specified mobile network site. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param options The options parameters. + */ + async beginDeletePacketCoreAndWait( + resourceGroupName: string, + mobileNetworkName: string, + siteName: string, + parameters: SiteDeletePacketCore, + options?: SitesDeletePacketCoreOptionalParams + ): Promise { + const poller = await this.beginDeletePacketCore( + resourceGroupName, + mobileNetworkName, + siteName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** * ListByMobileNetworkNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -465,7 +579,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters14, + requestBody: Parameters.parameters16, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -525,6 +639,32 @@ const listByMobileNetworkOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const deletePacketCoreOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}/deletePacketCore", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.mobileNetworkName, + Parameters.siteName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listByMobileNetworkNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts index 1377a61fce29..691f85868437 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Slice, SlicesListByMobileNetworkNextOptionalParams, @@ -140,14 +144,14 @@ export class SlicesImpl implements Slices { mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -180,15 +184,15 @@ export class SlicesImpl implements Slices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, sliceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, mobileNetworkName, sliceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -251,8 +255,8 @@ export class SlicesImpl implements Slices { parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SlicesCreateOrUpdateResponse > > { @@ -262,7 +266,7 @@ export class SlicesImpl implements Slices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -295,15 +299,24 @@ export class SlicesImpl implements Slices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, sliceName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + mobileNetworkName, + sliceName, + parameters, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SlicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -463,7 +476,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters15, + requestBody: Parameters.parameters18, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts index 502d29ee68ff..a740f7b97b97 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AttachedDataNetwork, AttachedDataNetworksListByPacketCoreDataPlaneOptionalParams, @@ -51,7 +51,7 @@ export interface AttachedDataNetworks { packetCoreDataPlaneName: string, attachedDataNetworkName: string, options?: AttachedDataNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified attached data network. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -100,8 +100,8 @@ export interface AttachedDataNetworks { parameters: AttachedDataNetwork, options?: AttachedDataNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AttachedDataNetworksCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts index f73736c828d2..84374aacb2f0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DataNetwork, DataNetworksListByMobileNetworkOptionalParams, @@ -47,7 +47,7 @@ export interface DataNetworks { mobileNetworkName: string, dataNetworkName: string, options?: DataNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified data network. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -90,8 +90,8 @@ export interface DataNetworks { parameters: DataNetwork, options?: DataNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DataNetworksCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/diagnosticsPackages.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/diagnosticsPackages.ts new file mode 100644 index 000000000000..36d57dcf5c9e --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/diagnosticsPackages.ts @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + DiagnosticsPackage, + DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams, + DiagnosticsPackagesCreateOrUpdateOptionalParams, + DiagnosticsPackagesCreateOrUpdateResponse, + DiagnosticsPackagesGetOptionalParams, + DiagnosticsPackagesGetResponse, + DiagnosticsPackagesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a DiagnosticsPackages. */ +export interface DiagnosticsPackages { + /** + * Lists all the diagnostics packages under a packet core control plane. + * @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. + */ + listByPacketCoreControlPlane( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: DiagnosticsPackagesListByPacketCoreControlPlaneOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates or updates a diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + DiagnosticsPackagesCreateOrUpdateResponse + > + >; + /** + * Creates or updates a diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesCreateOrUpdateOptionalParams + ): Promise; + /** + * Gets information about the specified diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesGetOptionalParams + ): Promise; + /** + * Deletes the specified diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified diagnostics package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + diagnosticsPackageName: string, + options?: DiagnosticsPackagesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts index 7fa4a6da8f4f..d497e206f3f8 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts @@ -8,8 +8,10 @@ export * from "./attachedDataNetworks"; export * from "./dataNetworks"; +export * from "./diagnosticsPackages"; export * from "./mobileNetworks"; export * from "./operations"; +export * from "./packetCaptures"; export * from "./packetCoreControlPlanes"; export * from "./packetCoreControlPlaneVersions"; export * from "./packetCoreDataPlanes"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts index 81f695fbd218..1f1c37e98d41 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { MobileNetwork, MobileNetworksListBySubscriptionOptionalParams, @@ -51,7 +51,7 @@ export interface MobileNetworks { resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -87,8 +87,8 @@ export interface MobileNetworks { parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MobileNetworksCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCaptures.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCaptures.ts new file mode 100644 index 000000000000..ab6176170f5b --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCaptures.ts @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PacketCapture, + PacketCapturesListByPacketCoreControlPlaneOptionalParams, + PacketCapturesCreateOrUpdateOptionalParams, + PacketCapturesCreateOrUpdateResponse, + PacketCapturesGetOptionalParams, + PacketCapturesGetResponse, + PacketCapturesDeleteOptionalParams, + PacketCapturesStopOptionalParams, + PacketCapturesStopResponse +} from "../models"; + +/// +/** Interface representing a PacketCaptures. */ +export interface PacketCaptures { + /** + * Lists all the packet capture sessions under a packet core control plane. + * @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. + */ + listByPacketCoreControlPlane( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCapturesListByPacketCoreControlPlaneOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates or updates a packet capture. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PacketCapturesCreateOrUpdateResponse + > + >; + /** + * Creates or updates a packet capture. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + parameters: PacketCapture, + options?: PacketCapturesCreateOrUpdateOptionalParams + ): Promise; + /** + * Gets information about the specified packet capture session. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesGetOptionalParams + ): Promise; + /** + * Deletes the specified packet capture. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified packet capture. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesDeleteOptionalParams + ): Promise; + /** + * Stop a packet capture session. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + beginStop( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PacketCapturesStopResponse + > + >; + /** + * Stop a packet capture session. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param options The options parameters. + */ + beginStopAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + packetCaptureName: string, + options?: PacketCapturesStopOptionalParams + ): Promise; +} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts index 14289e1d8898..68f7e3d22826 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts @@ -10,8 +10,11 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PacketCoreControlPlaneVersion, PacketCoreControlPlaneVersionsListOptionalParams, + PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams, PacketCoreControlPlaneVersionsGetOptionalParams, - PacketCoreControlPlaneVersionsGetResponse + PacketCoreControlPlaneVersionsGetResponse, + PacketCoreControlPlaneVersionsGetBySubscriptionOptionalParams, + PacketCoreControlPlaneVersionsGetBySubscriptionResponse } from "../models"; /// @@ -24,6 +27,13 @@ export interface PacketCoreControlPlaneVersions { list( options?: PacketCoreControlPlaneVersionsListOptionalParams ): PagedAsyncIterableIterator; + /** + * Lists all supported packet core control planes versions. + * @param options The options parameters. + */ + listBySubscription( + options?: PacketCoreControlPlaneVersionsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; /** * Gets information about the specified packet core control plane version. * @param versionName The name of the packet core control plane version. @@ -33,4 +43,13 @@ export interface PacketCoreControlPlaneVersions { versionName: string, options?: PacketCoreControlPlaneVersionsGetOptionalParams ): Promise; + /** + * Gets information about the specified packet core control plane version. + * @param versionName The name of the packet core control plane version. + * @param options The options parameters. + */ + getBySubscription( + versionName: string, + options?: PacketCoreControlPlaneVersionsGetBySubscriptionOptionalParams + ): Promise; } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts index ac1083089d75..f05d8d2deafa 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PacketCoreControlPlane, PacketCoreControlPlanesListBySubscriptionOptionalParams, @@ -17,7 +17,7 @@ import { PacketCoreControlPlanesGetResponse, PacketCoreControlPlanesCreateOrUpdateOptionalParams, PacketCoreControlPlanesCreateOrUpdateResponse, - TagsObject, + IdentityAndTagsObject, PacketCoreControlPlanesUpdateTagsOptionalParams, PacketCoreControlPlanesUpdateTagsResponse, PacketCoreControlPlanesRollbackOptionalParams, @@ -58,7 +58,7 @@ export interface PacketCoreControlPlanes { resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -94,8 +94,8 @@ export interface PacketCoreControlPlanes { parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesCreateOrUpdateResponse > >; @@ -113,16 +113,16 @@ export interface PacketCoreControlPlanes { options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams ): Promise; /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @param options The options parameters. */ updateTags( resourceGroupName: string, packetCoreControlPlaneName: string, - parameters: TagsObject, + parameters: IdentityAndTagsObject, options?: PacketCoreControlPlanesUpdateTagsOptionalParams ): Promise; /** @@ -137,8 +137,8 @@ export interface PacketCoreControlPlanes { packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesRollbackOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesRollbackResponse > >; @@ -166,8 +166,8 @@ export interface PacketCoreControlPlanes { packetCoreControlPlaneName: string, options?: PacketCoreControlPlanesReinstallOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreControlPlanesReinstallResponse > >; @@ -198,10 +198,8 @@ export interface PacketCoreControlPlanes { parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlanesCollectDiagnosticsPackageOptionalParams ): Promise< - PollerLike< - PollOperationState< - PacketCoreControlPlanesCollectDiagnosticsPackageResponse - >, + SimplePollerLike< + OperationState, PacketCoreControlPlanesCollectDiagnosticsPackageResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts index 250106ed8056..cfc19bbdb0c0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PacketCoreDataPlane, PacketCoreDataPlanesListByPacketCoreControlPlaneOptionalParams, @@ -47,7 +47,7 @@ export interface PacketCoreDataPlanes { packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, options?: PacketCoreDataPlanesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified packet core data plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -90,8 +90,8 @@ export interface PacketCoreDataPlanes { parameters: PacketCoreDataPlane, options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PacketCoreDataPlanesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts index 671bfe40bb53..4b1c5a0464b4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Service, ServicesListByMobileNetworkOptionalParams, @@ -48,7 +48,7 @@ export interface Services { mobileNetworkName: string, serviceName: string, options?: ServicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified service. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -93,8 +93,8 @@ export interface Services { parameters: Service, options?: ServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts index d865e349d57a..02425be9bbb4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SimGroup, SimGroupsListBySubscriptionOptionalParams, @@ -17,7 +17,7 @@ import { SimGroupsGetResponse, SimGroupsCreateOrUpdateOptionalParams, SimGroupsCreateOrUpdateResponse, - TagsObject, + IdentityAndTagsObject, SimGroupsUpdateTagsOptionalParams, SimGroupsUpdateTagsResponse } from "../models"; @@ -51,7 +51,7 @@ export interface SimGroups { resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified SIM group. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -87,8 +87,8 @@ export interface SimGroups { parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimGroupsCreateOrUpdateResponse > >; @@ -106,16 +106,16 @@ export interface SimGroups { options?: SimGroupsCreateOrUpdateOptionalParams ): Promise; /** - * Updates SIM group tags. + * Patch SIM group resource. * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @param options The options parameters. */ updateTags( resourceGroupName: string, simGroupName: string, - parameters: TagsObject, + parameters: IdentityAndTagsObject, options?: SimGroupsUpdateTagsOptionalParams ): Promise; } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts index b1cffb1375d0..a9f3da4a5fc1 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SimPolicy, SimPoliciesListByMobileNetworkOptionalParams, @@ -47,7 +47,7 @@ export interface SimPolicies { mobileNetworkName: string, simPolicyName: string, options?: SimPoliciesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified SIM policy. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -89,8 +89,8 @@ export interface SimPolicies { parameters: SimPolicy, options?: SimPoliciesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimPoliciesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts index 477d37cf39d3..e0c4a7d1f811 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Sim, SimsListByGroupOptionalParams, @@ -53,7 +53,7 @@ export interface Sims { simGroupName: string, simName: string, options?: SimsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -95,8 +95,8 @@ export interface Sims { parameters: Sim, options?: SimsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsCreateOrUpdateResponse > >; @@ -128,8 +128,8 @@ export interface Sims { parameters: SimUploadList, options?: SimsBulkUploadOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkUploadResponse > >; @@ -159,8 +159,8 @@ export interface Sims { parameters: SimDeleteList, options?: SimsBulkDeleteOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkDeleteResponse > >; @@ -190,8 +190,8 @@ export interface Sims { parameters: EncryptedSimUploadList, options?: SimsBulkUploadEncryptedOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SimsBulkUploadEncryptedResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts index e875c0a409fe..1ebe4975a688 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Site, SitesListByMobileNetworkOptionalParams, @@ -18,7 +18,9 @@ import { SitesCreateOrUpdateResponse, TagsObject, SitesUpdateTagsOptionalParams, - SitesUpdateTagsResponse + SitesUpdateTagsResponse, + SiteDeletePacketCore, + SitesDeletePacketCoreOptionalParams } from "../models"; /// @@ -48,7 +50,7 @@ export interface Sites { mobileNetworkName: string, siteName: string, options?: SitesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified mobile network site. This will also delete any network functions that are a * part of this site. @@ -92,8 +94,8 @@ export interface Sites { parameters: Site, options?: SitesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SitesCreateOrUpdateResponse > >; @@ -128,4 +130,34 @@ export interface Sites { parameters: TagsObject, options?: SitesUpdateTagsOptionalParams ): Promise; + /** + * Deletes a packet core under the specified mobile network site. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param options The options parameters. + */ + beginDeletePacketCore( + resourceGroupName: string, + mobileNetworkName: string, + siteName: string, + parameters: SiteDeletePacketCore, + options?: SitesDeletePacketCoreOptionalParams + ): Promise, void>>; + /** + * Deletes a packet core under the specified mobile network site. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @param options The options parameters. + */ + beginDeletePacketCoreAndWait( + resourceGroupName: string, + mobileNetworkName: string, + siteName: string, + parameters: SiteDeletePacketCore, + options?: SitesDeletePacketCoreOptionalParams + ): Promise; } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts index bcb7796c65c4..a956dd1b654d 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Slice, SlicesListByMobileNetworkOptionalParams, @@ -47,7 +47,7 @@ export interface Slices { mobileNetworkName: string, sliceName: string, options?: SlicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified network slice. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -90,8 +90,8 @@ export interface Slices { parameters: Slice, options?: SlicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SlicesCreateOrUpdateResponse > >; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/tsconfig.json b/sdk/mobilenetwork/arm-mobilenetwork/tsconfig.json index d28d7de2857d..3e6ae96443f3 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/tsconfig.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-mobilenetwork": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"