diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 113b932457ab..d769d07f66b3 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2961,7 +2961,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.6: @@ -3200,7 +3200,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3357,7 +3357,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -3493,6 +3493,7 @@ packages: /commander/2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + requiresBuild: true dev: false /commondir/1.0.1: @@ -3500,7 +3501,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /concurrently/6.5.1: @@ -3561,7 +3562,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3674,7 +3675,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /csv-parse/5.3.3: @@ -3928,7 +3929,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20221206 + typescript: 5.0.0-dev.20221207 dev: false /downlevel-dts/0.8.0: @@ -3947,11 +3948,11 @@ packages: dev: false /edge-launcher/1.2.2: - resolution: {integrity: sha1-60Cq+9Bnpup27/+rBke81VCbN7I=} + resolution: {integrity: sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==} dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.284: @@ -4832,7 +4833,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -4972,7 +4973,7 @@ packages: dev: false /github-from-package/0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false /glob-parent/5.1.2: @@ -6388,7 +6389,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6398,7 +6399,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-source-map/1.1.0: @@ -6815,7 +6816,7 @@ packages: dev: false /noms/0.0.0: - resolution: {integrity: sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=} + resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} dependencies: inherits: 2.0.4 readable-stream: 1.0.34 @@ -8949,8 +8950,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20221206: - resolution: {integrity: sha512-Yl7kEx5CxhDafU4SgjeLmlUZ7kbxKZBXlvnQQlfRLHtXSRyy4BsTx6h6loHDnCWkmRwpcyPJ88uquATOUGfLwQ==} + /typescript/5.0.0-dev.20221207: + resolution: {integrity: sha512-xPWWjASgLapa35nseHVRmQK6L0k3E1hb8OcN3I7XZHqYGUxk3n+RcncQSb4gGVromTEy7OHaoNSWLrkDO0+T1Q==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -9074,7 +9075,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -13297,7 +13298,7 @@ packages: dev: false file:projects/arm-mobilenetwork.tgz: - resolution: {integrity: sha512-2Bf7XEEiZm8l05sA/9xTIVm8o3S6LJzVtW8sK743onYbmqnNs4PNMuT7n1tseg9P/+bvHBrRXCcEIDszz0HFUg==, tarball: file:projects/arm-mobilenetwork.tgz} + resolution: {integrity: sha512-SJm09Aket4Z30m3Cq89vi1f3acJHX/UrXZJTXoZ3eTY0WRtwpqvLEXv0hbD2WOLnczPHzabCH2TDrysiX9RLWA==, tarball: file:projects/arm-mobilenetwork.tgz} name: '@rush-temp/arm-mobilenetwork' version: 0.0.0 dependencies: @@ -13308,18 +13309,18 @@ packages: '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 + '@types/node': 14.18.33 chai: 4.3.7 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 + rollup-plugin-sourcemaps: 0.6.3_1225c068d0546e507df7db46196a6444 tslib: 2.4.1 - typescript: 4.6.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - - '@types/node' - supports-color dev: false @@ -15778,7 +15779,7 @@ packages: dev: false file:projects/communication-job-router.tgz: - resolution: {integrity: sha512-/i/QMGXP/g10uWLW/0Wrait10N30QJaEJKnNioHUwg6wLgaZKnKkGQCyZgbHKAB7o8rkQsNSLIYBz920/Mt1Fg==, tarball: file:projects/communication-job-router.tgz} + resolution: {integrity: sha512-aJ10TxMFU+MdVJyQmkeThKCZbnZ6QmU9tzOoBz7yXNgmNlTMDVjYE6dpwJnWgHpDjOLHlYfnO5sEepLhZ/8Z8A==, tarball: file:projects/communication-job-router.tgz} name: '@rush-temp/communication-job-router' version: 0.0.0 dependencies: @@ -15830,7 +15831,7 @@ packages: dev: false file:projects/communication-network-traversal.tgz: - resolution: {integrity: sha512-8BxjW4TN+CR+jUFtm7WWGCLTSlmwVL5tHETlolRYZ4pT7mbg5u5U4g90FNC2cuVcWD21efKwcxwqtG7YuPF3pw==, tarball: file:projects/communication-network-traversal.tgz} + resolution: {integrity: sha512-/gHUTUZtOKjvHerwEWLt+fwQYvXqdowYDQg+aJXp5/Q3TJrnDnnZD0LB+cy7rsFVnhbcIz4i+E78C6FoVb4zFw==, tarball: file:projects/communication-network-traversal.tgz} name: '@rush-temp/communication-network-traversal' version: 0.0.0 dependencies: @@ -16145,7 +16146,7 @@ packages: dev: false file:projects/core-amqp.tgz: - resolution: {integrity: sha512-FohZhL1nEjGi/9HxIaQKjgP07gL1O++dXUtBoYbeIq4DJhlY8wivalEbwErJch88M5l+vOY0e9jKfjSp8VXXHg==, tarball: file:projects/core-amqp.tgz} + resolution: {integrity: sha512-vJ7aD2zobl65Rwr8xx9e21lUr0OnvQSx5Wnhyy4YWdtZA77wD5hTLqB3nXbtQhni6siHOObS5UgZepNRivjq/g==, tarball: file:projects/core-amqp.tgz} name: '@rush-temp/core-amqp' version: 0.0.0 dependencies: @@ -16877,7 +16878,7 @@ packages: dev: false file:projects/dtdl-parser.tgz: - resolution: {integrity: sha512-tpIsaZWhGDJnpVqy/VriUYjEM5qzcjiQQGnK0KfuZy5x36FdS9w0p5SVKr3fZWnYpBYRNST/8H6m79K3A5xYJw==, tarball: file:projects/dtdl-parser.tgz} + resolution: {integrity: sha512-oadak9uqVnuit3rJujUthnEnz749jsjM7CwpLJrcr6L5LeP56GUTojveukyCl5ZqNyN1z4Fc6q2rHtnFBKnZyw==, tarball: file:projects/dtdl-parser.tgz} name: '@rush-temp/dtdl-parser' version: 0.0.0 dependencies: @@ -16966,7 +16967,7 @@ packages: dev: false file:projects/event-hubs.tgz: - resolution: {integrity: sha512-j/S7lD5JD3mwUE5WQWMzk7VDFqwkWiIBtJZIPAha28VrJoOM51Wi88bhftXNzvzA8pWvUBYVQN8KiFz9He+PMg==, tarball: file:projects/event-hubs.tgz} + resolution: {integrity: sha512-8Z/Lp4mVyIyb92vRhanHwLEvH1v94/qa08iKbBRpTwyyFau+hFu+/F70Gsigf1ZP8z2WjrT3X5MpTKGi9PkMiA==, tarball: file:projects/event-hubs.tgz} name: '@rush-temp/event-hubs' version: 0.0.0 dependencies: @@ -18227,7 +18228,7 @@ packages: dev: false file:projects/notification-hubs.tgz: - resolution: {integrity: sha512-f2Mz829O/deVSeFCWsgd/wsbBvyPQeEsbqiZ5Mpji8E1Mt73o5Hsgpio4UhGwYiamC+Tht7VgZ9Tz5PqqJ2jCw==, tarball: file:projects/notification-hubs.tgz} + resolution: {integrity: sha512-4SZI+GsuvYZ7ljHY8A8lqLnCgwOEDYS1mGM0M64Dr+dP7gXDSiOf2pYw06fKFrXZVg9h9GQwgBImh6CVjJAmdA==, tarball: file:projects/notification-hubs.tgz} name: '@rush-temp/notification-hubs' version: 0.0.0 dependencies: diff --git a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md index 2a10fc681c41..93e9cbbbdad9 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md @@ -1,177 +1,5 @@ # Release History - -## 1.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.3 (2022-08-01) - -**Features** - - - Added operation group PacketCoreControlPlaneVersions - - Added operation group SimGroups - - Added operation Sims.listBySimGroup - - Added Interface AttachedDataNetwork - - Added Interface AzureStackEdgeDeviceResourceId - - Added Interface ConnectedClusterResourceId - - Added Interface DataNetwork - - Added Interface KeyVaultCertificate - - Added Interface KeyVaultKey - - Added Interface LocalDiagnosticsAccessConfiguration - - Added Interface ManagedServiceIdentity - - Added Interface MobileNetwork - - Added Interface PacketCoreControlPlane - - Added Interface PacketCoreControlPlaneVersion - - Added Interface PacketCoreControlPlaneVersionListResult - - Added Interface PacketCoreControlPlaneVersionsGetOptionalParams - - Added Interface PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams - - Added Interface PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams - - Added Interface PacketCoreDataPlane - - Added Interface PccRuleQosPolicy - - Added Interface PlatformConfiguration - - Added Interface ProxyResource - - Added Interface Service - - Added Interface Sim - - Added Interface SimGroup - - Added Interface SimGroupListResult - - Added Interface SimGroupResourceId - - Added Interface SimGroupsCreateOrUpdateOptionalParams - - Added Interface SimGroupsDeleteOptionalParams - - Added Interface SimGroupsGetOptionalParams - - Added Interface SimGroupsListByResourceGroupNextOptionalParams - - Added Interface SimGroupsListByResourceGroupOptionalParams - - Added Interface SimGroupsListBySubscriptionNextOptionalParams - - Added Interface SimGroupsListBySubscriptionOptionalParams - - Added Interface SimGroupsUpdateTagsOptionalParams - - Added Interface SimPolicy - - Added Interface SimsListBySimGroupNextOptionalParams - - Added Interface SimsListBySimGroupOptionalParams - - Added Interface Site - - Added Interface Slice - - Added Interface TrackedResource - - Added Interface UserAssignedIdentity - - Added Type Alias BillingSku - - Added Type Alias ManagedServiceIdentityType - - Added Type Alias PacketCoreControlPlaneVersionsGetResponse - - Added Type Alias PacketCoreControlPlaneVersionsListByResourceGroupNextResponse - - Added Type Alias PacketCoreControlPlaneVersionsListByResourceGroupResponse - - Added Type Alias PlatformType - - Added Type Alias RecommendedVersion - - Added Type Alias SimGroupsCreateOrUpdateResponse - - Added Type Alias SimGroupsGetResponse - - Added Type Alias SimGroupsListByResourceGroupNextResponse - - Added Type Alias SimGroupsListByResourceGroupResponse - - Added Type Alias SimGroupsListBySubscriptionNextResponse - - Added Type Alias SimGroupsListBySubscriptionResponse - - Added Type Alias SimGroupsUpdateTagsResponse - - Added Type Alias SimsListBySimGroupNextResponse - - Added Type Alias SimsListBySimGroupResponse - - Added Type Alias VersionState - - Class MobileNetworkManagementClient has a new parameter packetCoreControlPlaneVersions - - Class MobileNetworkManagementClient has a new parameter simGroups - - Added Enum KnownBillingSku - - Added Enum KnownManagedServiceIdentityType - - Added Enum KnownPlatformType - - Added Enum KnownRecommendedVersion - - Added Enum KnownVersionState - -**Breaking Changes** - - - Removed operation Sims.listByResourceGroup - - Removed operation Sims.listBySubscription - - Removed operation Sims.updateTags - - Operation Sims.beginCreateOrUpdate has a new signature - - Operation Sims.beginCreateOrUpdateAndWait has a new signature - - Operation Sims.beginDelete has a new signature - - Operation Sims.beginDeleteAndWait has a new signature - - Operation Sims.get has a new signature - - -## 1.0.0-beta.2 (2022-03-23) - -**Features** - - - Added Interface SystemData - - Added Type Alias SimState - - Interface InterfaceProperties has a new optional parameter ipv4Address - - Interface InterfaceProperties has a new optional parameter ipv4Gateway - - Interface InterfaceProperties has a new optional parameter ipv4Subnet - - Interface Resource has a new optional parameter systemData - - Type Alias Sim has a new parameter simState - - Added Enum KnownSimState - -**Breaking Changes** - - - Type Alias AttachedDataNetwork no longer has parameter createdBy - - Type Alias AttachedDataNetwork no longer has parameter createdByType - - Type Alias AttachedDataNetwork no longer has parameter createdAt - - Type Alias AttachedDataNetwork no longer has parameter lastModifiedBy - - Type Alias AttachedDataNetwork no longer has parameter lastModifiedByType - - Type Alias AttachedDataNetwork no longer has parameter lastModifiedAt - - Type Alias DataNetwork no longer has parameter createdBy - - Type Alias DataNetwork no longer has parameter createdByType - - Type Alias DataNetwork no longer has parameter createdAt - - Type Alias DataNetwork no longer has parameter lastModifiedBy - - Type Alias DataNetwork no longer has parameter lastModifiedByType - - Type Alias DataNetwork no longer has parameter lastModifiedAt - - Type Alias MobileNetwork no longer has parameter createdBy - - Type Alias MobileNetwork no longer has parameter createdByType - - Type Alias MobileNetwork no longer has parameter createdAt - - Type Alias MobileNetwork no longer has parameter lastModifiedBy - - Type Alias MobileNetwork no longer has parameter lastModifiedByType - - Type Alias MobileNetwork no longer has parameter lastModifiedAt - - Type Alias PacketCoreControlPlane no longer has parameter createdBy - - Type Alias PacketCoreControlPlane no longer has parameter createdByType - - Type Alias PacketCoreControlPlane no longer has parameter createdAt - - Type Alias PacketCoreControlPlane no longer has parameter lastModifiedBy - - Type Alias PacketCoreControlPlane no longer has parameter lastModifiedByType - - Type Alias PacketCoreControlPlane no longer has parameter lastModifiedAt - - Type Alias PacketCoreDataPlane no longer has parameter createdBy - - Type Alias PacketCoreDataPlane no longer has parameter createdByType - - Type Alias PacketCoreDataPlane no longer has parameter createdAt - - Type Alias PacketCoreDataPlane no longer has parameter lastModifiedBy - - Type Alias PacketCoreDataPlane no longer has parameter lastModifiedByType - - Type Alias PacketCoreDataPlane no longer has parameter lastModifiedAt - - Type Alias Service no longer has parameter createdBy - - Type Alias Service no longer has parameter createdByType - - Type Alias Service no longer has parameter createdAt - - Type Alias Service no longer has parameter lastModifiedBy - - Type Alias Service no longer has parameter lastModifiedByType - - Type Alias Service no longer has parameter lastModifiedAt - - Type Alias Sim no longer has parameter createdBy - - Type Alias Sim no longer has parameter createdByType - - Type Alias Sim no longer has parameter createdAt - - Type Alias Sim no longer has parameter lastModifiedBy - - Type Alias Sim no longer has parameter lastModifiedByType - - Type Alias Sim no longer has parameter lastModifiedAt - - Type Alias Sim no longer has parameter configurationState - - Type Alias SimPolicy no longer has parameter createdBy - - Type Alias SimPolicy no longer has parameter createdByType - - Type Alias SimPolicy no longer has parameter createdAt - - Type Alias SimPolicy no longer has parameter lastModifiedBy - - Type Alias SimPolicy no longer has parameter lastModifiedByType - - Type Alias SimPolicy no longer has parameter lastModifiedAt - - Type Alias Site no longer has parameter createdBy - - Type Alias Site no longer has parameter createdByType - - Type Alias Site no longer has parameter createdAt - - Type Alias Site no longer has parameter lastModifiedBy - - Type Alias Site no longer has parameter lastModifiedByType - - Type Alias Site no longer has parameter lastModifiedAt - - Type Alias Slice no longer has parameter createdBy - - Type Alias Slice no longer has parameter createdByType - - Type Alias Slice no longer has parameter createdAt - - Type Alias Slice no longer has parameter lastModifiedBy - - Type Alias Slice no longer has parameter lastModifiedByType - - Type Alias Slice no longer has parameter lastModifiedAt - - Removed Enum KnownConfigurationState - -## 1.0.0-beta.1 (2022-02-21) +## 1.0.0 (2022-12-08) The package of @azure/arm-mobilenetwork is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/mobilenetwork/arm-mobilenetwork/README.md b/sdk/mobilenetwork/arm-mobilenetwork/README.md index aeb10f2b20a9..d9a59f8fb9cb 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/README.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/README.md @@ -2,11 +2,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure MobileNetworkManagement client. -The resources in this swagger specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance +The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-mobilenetwork) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json index d19d6b4a44e9..18e7ab4516f6 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json @@ -1,8 +1,8 @@ { - "commit": "405811c51aa09803caedfe17fd305e110db1ca5e", + "commit": "62815acf41c163d6e0309dd791bd3476016ffd34", "readme": "specification/mobilenetwork/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mobilenetwork\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220720.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/mobilenetwork/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220720.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.2", + "use": "@autorest/typescript@6.0.0-rc.4" } \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/package.json b/sdk/mobilenetwork/arm-mobilenetwork/package.json index 155c2a73bfc8..14eac17740d0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/package.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MobileNetworkManagementClient.", - "version": "1.0.0-beta.4", + "version": "1.0.0", "engines": { "node": ">=14.0.0" }, @@ -11,7 +11,7 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.5.0", + "@azure/core-client": "^1.6.1", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -46,6 +46,7 @@ "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", + "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork", @@ -109,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/recordings/node/my_test/recording_sample_test.json b/sdk/mobilenetwork/arm-mobilenetwork/recordings/node/my_test/recording_sample_test.json deleted file mode 100644 index f721723386d8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/recordings/node/my_test/recording_sample_test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Entries": [], - "Variables": {} -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md index e82206adcdf2..8d6ef0e1e0e3 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md @@ -23,9 +23,27 @@ export interface Arp { priorityLevel: number; } +// @public +export interface AsyncOperationId { + id: string; +} + +// @public +export interface AsyncOperationStatus { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name?: string; + percentComplete?: number; + properties?: Record; + resourceId?: string; + startTime?: Date; + status: string; +} + // @public export interface AttachedDataNetwork extends TrackedResource { - dnsAddresses?: string[]; + dnsAddresses: string[]; naptConfiguration?: NaptConfiguration; readonly provisioningState?: ProvisioningState; userEquipmentAddressPoolPrefix?: string[]; @@ -98,21 +116,54 @@ export interface AttachedDataNetworksUpdateTagsOptionalParams extends coreClient // @public export type AttachedDataNetworksUpdateTagsResponse = AttachedDataNetwork; +// @public +export type AuthenticationType = string; + // @public export interface AzureStackEdgeDeviceResourceId { id: string; } +// @public +export interface AzureStackHCIClusterResourceId { + id: string; +} + // @public export type BillingSku = string; +// @public +export interface CertificateProvisioning { + readonly reason?: string; + readonly state?: CertificateProvisioningState; +} + +// @public +export type CertificateProvisioningState = string; + +// @public +export interface CommonSimPropertiesFormat { + deviceType?: string; + integratedCircuitCardIdentifier?: string; + internationalMobileSubscriberIdentity: string; + readonly provisioningState?: ProvisioningState; + simPolicy?: SimPolicyResourceId; + readonly simState?: SimState; + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; + staticIpConfiguration?: SimStaticIpProperties[]; + readonly vendorKeyFingerprint?: string; + readonly vendorName?: string; +} + // @public export interface ConnectedClusterResourceId { id: string; } // @public -export type CoreNetworkType = string; +export type CoreNetworkType = "5GC" | "EPC"; // @public export type CreatedByType = string; @@ -136,6 +187,7 @@ export interface DataNetworkConfiguration { dataNetwork: DataNetworkResourceId; defaultSessionType?: PduSessionType; fiveQi?: number; + maximumNumberOfBufferedPackets?: number; preemptionCapability?: PreemptionCapability; preemptionVulnerability?: PreemptionVulnerability; sessionAmbr: Ambr; @@ -206,6 +258,21 @@ export interface DataNetworksUpdateTagsOptionalParams extends coreClient.Operati // @public export type DataNetworksUpdateTagsResponse = DataNetwork; +// @public +export interface EncryptedSimPropertiesFormat extends CommonSimPropertiesFormat { + encryptedCredentials?: string; +} + +// @public +export interface EncryptedSimUploadList { + azureKeyIdentifier: number; + encryptedTransportKey: string; + signedTransportKey: string; + sims: SimNameAndEncryptedProperties[]; + vendorKeyFingerprint: string; + version: number; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -226,6 +293,24 @@ export interface ErrorResponse { error?: ErrorDetail; } +// @public +export function getContinuationToken(page: unknown): string | undefined; + +// @public +export interface HttpsServerCertificate { + certificateUrl: string; + readonly provisioning?: CertificateProvisioning; +} + +// @public +export interface Installation { + operation?: AsyncOperationId; + state?: InstallationState; +} + +// @public +export type InstallationState = string; + // @public export interface InterfaceProperties { ipv4Address?: string; @@ -235,30 +320,32 @@ export interface InterfaceProperties { } // @public -export interface KeyVaultCertificate { - certificateUrl?: string; +export interface KeyVaultKey { + keyUrl?: string; } // @public -export interface KeyVaultKey { - keyUrl?: string; +export enum KnownAuthenticationType { + AAD = "AAD", + Password = "Password" } // @public export enum KnownBillingSku { - EdgeSite2Gbps = "EdgeSite2GBPS", - EdgeSite3Gbps = "EdgeSite3GBPS", - EdgeSite4Gbps = "EdgeSite4GBPS", - EvaluationPackage = "EvaluationPackage", - FlagshipStarterPackage = "FlagshipStarterPackage", - LargePackage = "LargePackage", - MediumPackage = "MediumPackage" + G0 = "G0", + G1 = "G1", + G10 = "G10", + G2 = "G2", + G3 = "G3", + G4 = "G4", + G5 = "G5" } // @public -export enum KnownCoreNetworkType { - EPC = "EPC", - FiveGC = "5GC" +export enum KnownCertificateProvisioningState { + Failed = "Failed", + NotProvisioned = "NotProvisioned", + Provisioned = "Provisioned" } // @public @@ -269,6 +356,19 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownInstallationState { + Failed = "Failed", + Installed = "Installed", + Installing = "Installing", + Reinstalling = "Reinstalling", + RollingBack = "RollingBack", + Uninstalled = "Uninstalled", + Uninstalling = "Uninstalling", + Updating = "Updating", + Upgrading = "Upgrading" +} + // @public export enum KnownManagedServiceIdentityType { None = "None", @@ -283,6 +383,12 @@ export enum KnownNaptEnabled { Enabled = "Enabled" } +// @public +export enum KnownObsoleteVersion { + NotObsolete = "NotObsolete", + Obsolete = "Obsolete" +} + // @public export enum KnownPduSessionType { IPv4 = "IPv4", @@ -292,7 +398,7 @@ export enum KnownPduSessionType { // @public export enum KnownPlatformType { AKSHCI = "AKS-HCI", - BaseVM = "BaseVM" + ThreePAzureStackHCI = "3P-AZURE-STACK-HCI" } // @public @@ -338,6 +444,16 @@ export enum KnownSimState { Invalid = "Invalid" } +// @public +export enum KnownSiteProvisioningState { + Adding = "Adding", + Deleting = "Deleting", + Failed = "Failed", + NotApplicable = "NotApplicable", + Provisioned = "Provisioned", + Updating = "Updating" +} + // @public export enum KnownTrafficControlPermission { Blocked = "Blocked", @@ -356,7 +472,8 @@ export enum KnownVersionState { // @public export interface LocalDiagnosticsAccessConfiguration { - httpsServerCertificate?: KeyVaultCertificate; + authenticationType: AuthenticationType; + httpsServerCertificate?: HttpsServerCertificate; } // @public @@ -401,6 +518,8 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // (undocumented) operations: Operations; // (undocumented) + packetCoreControlPlaneOperations: PacketCoreControlPlaneOperations; + // (undocumented) packetCoreControlPlanes: PacketCoreControlPlanes; // (undocumented) packetCoreControlPlaneVersions: PacketCoreControlPlaneVersions; @@ -411,6 +530,8 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // (undocumented) simGroups: SimGroups; // (undocumented) + simOperations: SimOperations; + // (undocumented) simPolicies: SimPolicies; // (undocumented) sims: Sims; @@ -440,8 +561,6 @@ export interface MobileNetworks { beginCreateOrUpdateAndWait(resourceGroupName: string, mobileNetworkName: string, parameters: MobileNetwork, options?: MobileNetworksCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksDeleteOptionalParams): Promise; - beginListSimIds(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksListSimIdsOptionalParams): Promise, MobileNetworksListSimIdsResponse>>; - beginListSimIdsAndWait(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksListSimIdsOptionalParams): Promise; get(resourceGroupName: string, mobileNetworkName: string, options?: MobileNetworksGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: MobileNetworksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: MobileNetworksListBySubscriptionOptionalParams): PagedAsyncIterableIterator; @@ -498,15 +617,6 @@ export interface MobileNetworksListBySubscriptionOptionalParams extends coreClie // @public export type MobileNetworksListBySubscriptionResponse = MobileNetworkListResult; -// @public -export interface MobileNetworksListSimIdsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type MobileNetworksListSimIdsResponse = SimIdListResult; - // @public export interface MobileNetworksUpdateTagsOptionalParams extends coreClient.OperationOptions { } @@ -526,6 +636,9 @@ export interface NaptConfiguration { // @public export type NaptEnabled = string; +// @public +export type ObsoleteVersion = string; + // @public export interface Operation { readonly display?: OperationDisplay; @@ -571,21 +684,66 @@ export interface PacketCoreControlPlane extends TrackedResource { controlPlaneAccessInterface: InterfaceProperties; coreNetworkTechnology?: CoreNetworkType; identity?: ManagedServiceIdentity; + readonly installation?: Installation; interopSettings?: Record; - localDiagnosticsAccess?: LocalDiagnosticsAccessConfiguration; - mobileNetwork: MobileNetworkResourceId; - platform?: PlatformConfiguration; + localDiagnosticsAccess: LocalDiagnosticsAccessConfiguration; + platform: PlatformConfiguration; readonly provisioningState?: ProvisioningState; + readonly rollbackVersion?: string; + sites: SiteResourceId[]; sku: BillingSku; + ueMtu?: number; version?: string; } +// @public +export interface PacketCoreControlPlaneCollectDiagnosticsPackage { + storageAccountBlobUrl: string; +} + +// @public +export interface PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PacketCoreControlPlaneCollectDiagnosticsPackageResponse = AsyncOperationStatus; + // @public export interface PacketCoreControlPlaneListResult { readonly nextLink?: string; value?: PacketCoreControlPlane[]; } +// @public +export interface PacketCoreControlPlaneOperations { + beginCollectDiagnosticsPackage(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams): Promise, PacketCoreControlPlaneCollectDiagnosticsPackageResponse>>; + beginCollectDiagnosticsPackageAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams): Promise; + beginReinstall(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlaneReinstallOptionalParams): Promise, PacketCoreControlPlaneReinstallResponse>>; + beginReinstallAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlaneReinstallOptionalParams): Promise; + beginRollback(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlaneRollbackOptionalParams): Promise, PacketCoreControlPlaneRollbackResponse>>; + beginRollbackAndWait(resourceGroupName: string, packetCoreControlPlaneName: string, options?: PacketCoreControlPlaneRollbackOptionalParams): Promise; +} + +// @public +export interface PacketCoreControlPlaneReinstallOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PacketCoreControlPlaneReinstallResponse = AsyncOperationStatus; + +// @public +export interface PacketCoreControlPlaneRollbackOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PacketCoreControlPlaneRollbackResponse = AsyncOperationStatus; + // @public export interface PacketCoreControlPlanes { beginCreateOrUpdate(resourceGroupName: string, packetCoreControlPlaneName: string, parameters: PacketCoreControlPlane, options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams): Promise, PacketCoreControlPlanesCreateOrUpdateResponse>>; @@ -657,9 +815,8 @@ export type PacketCoreControlPlanesUpdateTagsResponse = PacketCoreControlPlane; // @public export interface PacketCoreControlPlaneVersion extends ProxyResource { + platforms?: Platform[]; readonly provisioningState?: ProvisioningState; - recommendedVersion?: RecommendedVersion; - versionState?: VersionState; } // @public @@ -671,7 +828,7 @@ export interface PacketCoreControlPlaneVersionListResult { // @public export interface PacketCoreControlPlaneVersions { get(versionName: string, options?: PacketCoreControlPlaneVersionsGetOptionalParams): Promise; - listByResourceGroup(options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + list(options?: PacketCoreControlPlaneVersionsListOptionalParams): PagedAsyncIterableIterator; } // @public @@ -682,18 +839,18 @@ export interface PacketCoreControlPlaneVersionsGetOptionalParams extends coreCli export type PacketCoreControlPlaneVersionsGetResponse = PacketCoreControlPlaneVersion; // @public -export interface PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface PacketCoreControlPlaneVersionsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type PacketCoreControlPlaneVersionsListByResourceGroupNextResponse = PacketCoreControlPlaneVersionListResult; +export type PacketCoreControlPlaneVersionsListNextResponse = PacketCoreControlPlaneVersionListResult; // @public -export interface PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface PacketCoreControlPlaneVersionsListOptionalParams extends coreClient.OperationOptions { } // @public -export type PacketCoreControlPlaneVersionsListByResourceGroupResponse = PacketCoreControlPlaneVersionListResult; +export type PacketCoreControlPlaneVersionsListResponse = PacketCoreControlPlaneVersionListResult; // @public export interface PacketCoreDataPlane extends TrackedResource { @@ -785,9 +942,21 @@ export interface PinholeTimeouts { udp?: number; } +// @public +export interface Platform { + maximumPlatformSoftwareVersion?: string; + minimumPlatformSoftwareVersion?: string; + obsoleteVersion?: ObsoleteVersion; + platformType?: PlatformType; + recommendedVersion?: RecommendedVersion; + versionState?: VersionState; +} + // @public export interface PlatformConfiguration { azureStackEdgeDevice?: AzureStackEdgeDeviceResourceId; + readonly azureStackEdgeDevices?: AzureStackEdgeDeviceResourceId[]; + azureStackHciCluster?: AzureStackHCIClusterResourceId; connectedCluster?: ConnectedClusterResourceId; customLocation?: CustomLocationResourceId; type: PlatformType; @@ -942,7 +1111,44 @@ export interface Sim extends ProxyResource { readonly provisioningState?: ProvisioningState; simPolicy?: SimPolicyResourceId; readonly simState?: SimState; + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; staticIpConfiguration?: SimStaticIpProperties[]; + readonly vendorKeyFingerprint?: string; + readonly vendorName?: string; +} + +// @public +export interface SimBulkDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SimBulkDeleteResponse = AsyncOperationStatus; + +// @public +export interface SimBulkUploadEncryptedOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SimBulkUploadEncryptedResponse = AsyncOperationStatus; + +// @public +export interface SimBulkUploadOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SimBulkUploadResponse = AsyncOperationStatus; + +// @public +export interface SimDeleteList { + sims: string[]; } // @public @@ -1034,15 +1240,56 @@ export interface SimGroupsUpdateTagsOptionalParams extends coreClient.OperationO export type SimGroupsUpdateTagsResponse = SimGroup; // @public -export interface SimIdListResult { +export interface SimListResult { readonly nextLink?: string; - value?: SubResource[]; + value?: Sim[]; } // @public -export interface SimListResult { - readonly nextLink?: string; - value?: Sim[]; +export interface SimNameAndEncryptedProperties { + deviceType?: string; + encryptedCredentials?: string; + integratedCircuitCardIdentifier?: string; + internationalMobileSubscriberIdentity: string; + name: string; + readonly provisioningState?: ProvisioningState; + simPolicy?: SimPolicyResourceId; + readonly simState?: SimState; + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; + staticIpConfiguration?: SimStaticIpProperties[]; + readonly vendorKeyFingerprint?: string; + readonly vendorName?: string; +} + +// @public +export interface SimNameAndProperties { + authenticationKey?: string; + deviceType?: string; + integratedCircuitCardIdentifier?: string; + internationalMobileSubscriberIdentity: string; + name: string; + operatorKeyCode?: string; + readonly provisioningState?: ProvisioningState; + simPolicy?: SimPolicyResourceId; + readonly simState?: SimState; + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; + staticIpConfiguration?: SimStaticIpProperties[]; + readonly vendorKeyFingerprint?: string; + readonly vendorName?: string; +} + +// @public +export interface SimOperations { + beginBulkDelete(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimBulkDeleteOptionalParams): Promise, SimBulkDeleteResponse>>; + beginBulkDeleteAndWait(resourceGroupName: string, simGroupName: string, parameters: SimDeleteList, options?: SimBulkDeleteOptionalParams): Promise; + beginBulkUpload(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimBulkUploadOptionalParams): Promise, SimBulkUploadResponse>>; + beginBulkUploadAndWait(resourceGroupName: string, simGroupName: string, parameters: SimUploadList, options?: SimBulkUploadOptionalParams): Promise; + beginBulkUploadEncrypted(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimBulkUploadEncryptedOptionalParams): Promise, SimBulkUploadEncryptedResponse>>; + beginBulkUploadEncryptedAndWait(resourceGroupName: string, simGroupName: string, parameters: EncryptedSimUploadList, options?: SimBulkUploadEncryptedOptionalParams): Promise; } // @public @@ -1105,6 +1352,9 @@ export interface SimPolicy extends TrackedResource { readonly provisioningState?: ProvisioningState; registrationTimer?: number; rfspIndex?: number; + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; sliceConfigurations: SliceConfiguration[]; ueAmbr: Ambr; } @@ -1120,6 +1370,12 @@ export interface SimPolicyResourceId { id: string; } +// @public +export interface SimPropertiesFormat extends CommonSimPropertiesFormat { + authenticationKey?: string; + operatorKeyCode?: string; +} + // @public export interface Sims { beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise, SimsCreateOrUpdateResponse>>; @@ -1127,7 +1383,7 @@ export interface Sims { 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; - listBySimGroup(resourceGroupName: string, simGroupName: string, options?: SimsListBySimGroupOptionalParams): PagedAsyncIterableIterator; + listByGroup(resourceGroupName: string, simGroupName: string, options?: SimsListByGroupOptionalParams): PagedAsyncIterableIterator; } // @public @@ -1153,18 +1409,18 @@ export interface SimsGetOptionalParams extends coreClient.OperationOptions { export type SimsGetResponse = Sim; // @public -export interface SimsListBySimGroupNextOptionalParams extends coreClient.OperationOptions { +export interface SimsListByGroupNextOptionalParams extends coreClient.OperationOptions { } // @public -export type SimsListBySimGroupNextResponse = SimListResult; +export type SimsListByGroupNextResponse = SimListResult; // @public -export interface SimsListBySimGroupOptionalParams extends coreClient.OperationOptions { +export interface SimsListByGroupOptionalParams extends coreClient.OperationOptions { } // @public -export type SimsListBySimGroupResponse = SimListResult; +export type SimsListByGroupResponse = SimListResult; // @public export type SimState = string; @@ -1181,9 +1437,14 @@ export interface SimStaticIpPropertiesStaticIp { ipv4Address?: string; } +// @public +export interface SimUploadList { + sims: SimNameAndProperties[]; +} + // @public export interface Site extends TrackedResource { - networkFunctions?: SubResource[]; + readonly networkFunctions?: SubResource[]; readonly provisioningState?: ProvisioningState; } @@ -1193,6 +1454,14 @@ export interface SiteListResult { value?: Site[]; } +// @public +export type SiteProvisioningState = string; + +// @public +export interface SiteResourceId { + id: string; +} + // @public export interface Sites { beginCreateOrUpdate(resourceGroupName: string, mobileNetworkName: string, siteName: string, parameters: Site, options?: SitesCreateOrUpdateOptionalParams): Promise, SitesCreateOrUpdateResponse>>; 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 6450ec1ee78f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts +++ /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. -import { - AttachedDataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates an attached data network. - * - * @summary Creates or updates an attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createAttachedDataNetwork().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 8358b48a0d7a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteAttachedDataNetworkResource().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 d7cb67a4980e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getAttachedDataNetwork().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 1bd7d0d3d21e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksListByPacketCoreDataPlaneSample.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"; - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listAttachedDataNetworksInADataPlane().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 4af6c762e172..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateAttachedDataNetworkTags().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 f2db18e2479a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksCreateOrUpdateSample.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 { - DataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a data network. - * - * @summary Creates or updates a data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createDataNetwork().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 573b569689c3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteDataNetwork().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 c40fa0755d55..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getDataNetwork().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 ff01720e9caa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listDataNetworksInAMobileNetwork().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 d10cccc7e1da..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/dataNetworksUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateDataNetworkTags().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 fe719b540225..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksCreateOrUpdateSample.ts +++ /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. -import { - MobileNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createMobileNetwork().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 64baabdf0fe9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteMobileNetwork().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 9052d00758b7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getMobileNetwork().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 8b8afe46e09c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listMobileNetworksInResourceGroup().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 caa72d775a6a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = "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); -} - -listMobileNetworksInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListSimIdsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListSimIdsSample.ts deleted file mode 100644 index bfedb3e0fe84..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksListSimIdsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * This sample demonstrates how to Lists the IDs of all provisioned SIMs in a mobile network - * - * @summary Lists the IDs of all provisioned SIMs in a mobile network - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimIdListByMobileNetwork.json - */ -async function listTheIDsOfAllProvisionedSimsInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "rg"; - const mobileNetworkName = "testMobileNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginListSimIdsAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -listTheIDsOfAllProvisionedSimsInAMobileNetwork().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 53e9e970474e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/mobileNetworksUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateMobileNetworkTags().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 ea40248d2fca..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = "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); -} - -getRegistrationOperations().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 8cb8e00c4807..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = "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); -} - -getPacketCoreControlPlaneVersion().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListByResourceGroupSample.ts deleted file mode 100644 index 40fd39857e2b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlaneVersionsListByResourceGroupSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionListByResourceGroup.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = "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.listByResourceGroup()) { - resArray.push(item); - } - console.log(resArray); -} - -getSupportedPacketCoreControlPlaneVersions().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 2cb66a47df6a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.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 { - PacketCoreControlPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlane = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - httpsServerCertificate: { - certificateUrl: - "https://contosovault.vault.azure.net/certificates/ingress" - } - }, - location: "eastus", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - }, - 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" - } - }, - sku: "testSku", - 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); -} - -createPacketCoreControlPlane().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 b4f9a00a92bc..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deletePacketCoreControlPlane().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 e94512564a31..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getPacketCoreControlPlane().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 ce9eb048872a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listPacketCoreControlPlanesInResourceGroup().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 4c099bc55d90..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = "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); -} - -listPacketCoreControlPlanesInASubscription().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 c222c473b6ef..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updatePacketCoreControlPlaneTags().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 287542f5914a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesCreateOrUpdateSample.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 { - PacketCoreDataPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. - * - * @summary Creates or updates a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createPacketCoreDataPlane().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 b5023d011a83..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deletePacketCoreDataPlane().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 f3188888dce0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getPacketCoreDataPlane().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 2a4ac528235a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listPacketCoreDataPlanesInAControlPlane().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 29e31b31776e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreDataPlanesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updatePacketCoreDataPlaneTags().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 e42179932eae..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * This sample demonstrates how to Creates or updates a service. - * - * @summary Creates or updates a service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createService().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 7ef2bfc505e6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteService().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 5b5878aab899..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getService().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 cf02962ca82b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listServicesInAMobileNetwork().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 9f408af1a13d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/servicesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateServiceTags().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 73a9dd5ee370..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsCreateOrUpdateSample.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 { - SimGroup, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimGroup = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey" - }, - 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); -} - -createSimGroup().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 ddeb8eae3ffd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSimGroup().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 290c6495474e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSimGroup().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 d95e6ce3ade9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listSimGroupsInAResourceGroup().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 a7b451e1b56c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = "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); -} - -listSimGroupsInASubscription().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 fa28f97cd2c1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simGroupsUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateSimGroupTags().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 eff49d47a0e1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * This sample demonstrates how to Creates or updates a SIM policy. - * - * @summary Creates or updates a SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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", - 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); -} - -createSimPolicy().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 7cea595b2902..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSimPolicy().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 8eee093135d8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSimPolicy().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 f651e0944573..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listSimPoliciesInAMobileNetwork().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 e38e4cafd832..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateSimPolicyTags().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 9a41d22ea90a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createSim().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 11225c0c1413..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSim().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 c3fa1f3ed166..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListBySimGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListBySimGroupSample.ts deleted file mode 100644 index 5b327f24d1da..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListBySimGroupSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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.listBySimGroup( - resourceGroupName, - simGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listSiMSInASimGroup().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 dc9619730bad..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesCreateOrUpdateSample.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 { Site, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a mobile network site. - * - * @summary Creates or updates a mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: Site = { - location: "testLocation", - networkFunctions: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/testNf" - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -createMobileNetworkSite().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 b2038fb77fab..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified mobile network site. - * - * @summary Deletes the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteMobileNetworkSite().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 97396aa3df45..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getMobileNetworkSite().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 98a0e0fe8f09..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listMobileNetworkSitesInAMobileNetwork().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 c10c5e81b768..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/sitesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateMobileNetworkSiteTags().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 2928c5d55e8a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesCreateOrUpdateSample.ts +++ /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. -import { Slice, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a network slice. - * - * @summary Creates or updates a network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createNetworkSlice().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 36a51125fdc4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteNetworkSlice().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 9453d5ac51b7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getNetworkSlice().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 c64fd8e9df16..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listNetworkSlicesInAMobileNetwork().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 3620b94dc435..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/slicesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateNetworkSliceTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/README.md b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/README.md deleted file mode 100644 index 1c0e87acd547..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,170 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [attachedDataNetworksCreateOrUpdateSample.js][attacheddatanetworkscreateorupdatesample] | Creates or updates an attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkCreate.json | -| [attachedDataNetworksDeleteSample.js][attacheddatanetworksdeletesample] | Deletes the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkDelete.json | -| [attachedDataNetworksGetSample.js][attacheddatanetworksgetsample] | Gets information about the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/AttachedDataNetworkListByPacketCoreDataPlane.json | -| [attachedDataNetworksUpdateTagsSample.js][attacheddatanetworksupdatetagssample] | Updates an attached data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkUpdateTags.json | -| [dataNetworksCreateOrUpdateSample.js][datanetworkscreateorupdatesample] | Creates or updates a data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkCreate.json | -| [dataNetworksDeleteSample.js][datanetworksdeletesample] | Deletes the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkDelete.json | -| [dataNetworksGetSample.js][datanetworksgetsample] | Gets information about the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkGet.json | -| [dataNetworksListByMobileNetworkSample.js][datanetworkslistbymobilenetworksample] | Lists all data networks in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkListByMobileNetwork.json | -| [dataNetworksUpdateTagsSample.js][datanetworksupdatetagssample] | Updates data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkUpdateTags.json | -| [mobileNetworksCreateOrUpdateSample.js][mobilenetworkscreateorupdatesample] | Creates or updates a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkCreate.json | -| [mobileNetworksDeleteSample.js][mobilenetworksdeletesample] | Deletes the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkDelete.json | -| [mobileNetworksGetSample.js][mobilenetworksgetsample] | Gets information about the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/MobileNetworkListByResourceGroup.json | -| [mobileNetworksListBySubscriptionSample.js][mobilenetworkslistbysubscriptionsample] | Lists all the mobile networks in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkListBySubscription.json | -| [mobileNetworksListSimIdsSample.js][mobilenetworkslistsimidssample] | Lists the IDs of all provisioned SIMs in a mobile network x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimIdListByMobileNetwork.json | -| [mobileNetworksUpdateTagsSample.js][mobilenetworksupdatetagssample] | Updates mobile network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkUpdateTags.json | -| [operationsListSample.js][operationslistsample] | Gets a list of the operations. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionGet.json | -| [packetCoreControlPlaneVersionsListByResourceGroupSample.js][packetcorecontrolplaneversionslistbyresourcegroupsample] | Lists all supported packet core control planes versions. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionListByResourceGroup.json | -| [packetCoreControlPlanesCreateOrUpdateSample.js][packetcorecontrolplanescreateorupdatesample] | Creates or updates a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneCreate.json | -| [packetCoreControlPlanesDeleteSample.js][packetcorecontrolplanesdeletesample] | Deletes the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/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/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListBySubscription.json | -| [packetCoreControlPlanesUpdateTagsSample.js][packetcorecontrolplanesupdatetagssample] | Updates packet core control planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneUpdateTags.json | -| [packetCoreDataPlanesCreateOrUpdateSample.js][packetcoredataplanescreateorupdatesample] | Creates or updates a packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneCreate.json | -| [packetCoreDataPlanesDeleteSample.js][packetcoredataplanesdeletesample] | Deletes the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json | -| [packetCoreDataPlanesUpdateTagsSample.js][packetcoredataplanesupdatetagssample] | Updates packet core data planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneUpdateTags.json | -| [servicesCreateOrUpdateSample.js][servicescreateorupdatesample] | Creates or updates a service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceCreate.json | -| [servicesDeleteSample.js][servicesdeletesample] | Deletes the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceDelete.json | -| [servicesGetSample.js][servicesgetsample] | Gets information about the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceGet.json | -| [servicesListByMobileNetworkSample.js][serviceslistbymobilenetworksample] | Gets all the services in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceListByMobileNetwork.json | -| [servicesUpdateTagsSample.js][servicesupdatetagssample] | Updates service tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceUpdateTags.json | -| [simGroupsCreateOrUpdateSample.js][simgroupscreateorupdatesample] | Creates or updates a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupCreate.json | -| [simGroupsDeleteSample.js][simgroupsdeletesample] | Deletes the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupDelete.json | -| [simGroupsGetSample.js][simgroupsgetsample] | Gets information about the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/SimGroupListByResourceGroup.json | -| [simGroupsListBySubscriptionSample.js][simgroupslistbysubscriptionsample] | Gets all the SIM groups in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupListBySubscription.json | -| [simGroupsUpdateTagsSample.js][simgroupsupdatetagssample] | Updates SIM group tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupUpdateTags.json | -| [simPoliciesCreateOrUpdateSample.js][simpoliciescreateorupdatesample] | Creates or updates a SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyCreate.json | -| [simPoliciesDeleteSample.js][simpoliciesdeletesample] | Deletes the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyDelete.json | -| [simPoliciesGetSample.js][simpoliciesgetsample] | Gets information about the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/SimPolicyListByMobileNetwork.json | -| [simPoliciesUpdateTagsSample.js][simpoliciesupdatetagssample] | Updates SIM policy tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyUpdateTags.json | -| [simsCreateOrUpdateSample.js][simscreateorupdatesample] | Creates or updates a SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimCreate.json | -| [simsDeleteSample.js][simsdeletesample] | Deletes the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimDelete.json | -| [simsGetSample.js][simsgetsample] | Gets information about the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGet.json | -| [simsListBySimGroupSample.js][simslistbysimgroupsample] | Gets all the SIMs in a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimListBySimGroup.json | -| [sitesCreateOrUpdateSample.js][sitescreateorupdatesample] | Creates or updates a mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteCreate.json | -| [sitesDeleteSample.js][sitesdeletesample] | Deletes the specified mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteDelete.json | -| [sitesGetSample.js][sitesgetsample] | Gets information about the specified mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteGet.json | -| [sitesListByMobileNetworkSample.js][siteslistbymobilenetworksample] | Lists all sites in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteListByMobileNetwork.json | -| [sitesUpdateTagsSample.js][sitesupdatetagssample] | Updates site tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteUpdateTags.json | -| [slicesCreateOrUpdateSample.js][slicescreateorupdatesample] | Creates or updates a network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceCreate.json | -| [slicesDeleteSample.js][slicesdeletesample] | Deletes the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceDelete.json | -| [slicesGetSample.js][slicesgetsample] | Gets information about the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceGet.json | -| [slicesListByMobileNetworkSample.js][sliceslistbymobilenetworksample] | Lists all slices in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceListByMobileNetwork.json | -| [slicesUpdateTagsSample.js][slicesupdatetagssample] | Updates slice tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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 node attachedDataNetworksCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[attacheddatanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksCreateOrUpdateSample.js -[attacheddatanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksDeleteSample.js -[attacheddatanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksGetSample.js -[attacheddatanetworkslistbypacketcoredataplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js -[attacheddatanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksUpdateTagsSample.js -[datanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksCreateOrUpdateSample.js -[datanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksDeleteSample.js -[datanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksGetSample.js -[datanetworkslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksListByMobileNetworkSample.js -[datanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksUpdateTagsSample.js -[mobilenetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksCreateOrUpdateSample.js -[mobilenetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksDeleteSample.js -[mobilenetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksGetSample.js -[mobilenetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListByResourceGroupSample.js -[mobilenetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListBySubscriptionSample.js -[mobilenetworkslistsimidssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListSimIdsSample.js -[mobilenetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksUpdateTagsSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/operationsListSample.js -[packetcorecontrolplaneversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlaneVersionsGetSample.js -[packetcorecontrolplaneversionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlaneVersionsListByResourceGroupSample.js -[packetcorecontrolplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesCreateOrUpdateSample.js -[packetcorecontrolplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesDeleteSample.js -[packetcorecontrolplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesGetSample.js -[packetcorecontrolplaneslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesListByResourceGroupSample.js -[packetcorecontrolplaneslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesListBySubscriptionSample.js -[packetcorecontrolplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesUpdateTagsSample.js -[packetcoredataplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesCreateOrUpdateSample.js -[packetcoredataplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesDeleteSample.js -[packetcoredataplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesGetSample.js -[packetcoredataplaneslistbypacketcorecontrolplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js -[packetcoredataplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesUpdateTagsSample.js -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesDeleteSample.js -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesGetSample.js -[serviceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesListByMobileNetworkSample.js -[servicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesUpdateTagsSample.js -[simgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsCreateOrUpdateSample.js -[simgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsDeleteSample.js -[simgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsGetSample.js -[simgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsListByResourceGroupSample.js -[simgroupslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsListBySubscriptionSample.js -[simgroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsUpdateTagsSample.js -[simpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesCreateOrUpdateSample.js -[simpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesDeleteSample.js -[simpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesGetSample.js -[simpolicieslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesListByMobileNetworkSample.js -[simpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesUpdateTagsSample.js -[simscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsCreateOrUpdateSample.js -[simsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsDeleteSample.js -[simsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsGetSample.js -[simslistbysimgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListBySimGroupSample.js -[sitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesCreateOrUpdateSample.js -[sitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesDeleteSample.js -[sitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesGetSample.js -[siteslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesListByMobileNetworkSample.js -[sitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesUpdateTagsSample.js -[slicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesCreateOrUpdateSample.js -[slicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesDeleteSample.js -[slicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesGetSample.js -[sliceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesListByMobileNetworkSample.js -[slicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesUpdateTagsSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork/README.md diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksCreateOrUpdateSample.js deleted file mode 100644 index 02f69d35fe0b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksCreateOrUpdateSample.js +++ /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. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates an attached data network. - * - * @summary Creates or updates an attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createAttachedDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksDeleteSample.js deleted file mode 100644 index a1e907c0c766..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksDeleteSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteAttachedDataNetworkResource().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksGetSample.js deleted file mode 100644 index 18446f43f5e9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksGetSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getAttachedDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.js deleted file mode 100644 index a4200b89116f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksListByPacketCoreDataPlaneSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listAttachedDataNetworksInADataPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksUpdateTagsSample.js deleted file mode 100644 index 221d11ab4ea8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksUpdateTagsSample.js +++ /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. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateAttachedDataNetworkTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksCreateOrUpdateSample.js deleted file mode 100644 index 2eeebd543139..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksCreateOrUpdateSample.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"); - -/** - * This sample demonstrates how to Creates or updates a data network. - * - * @summary Creates or updates a data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksDeleteSample.js deleted file mode 100644 index aa205a57c193..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksDeleteSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksGetSample.js deleted file mode 100644 index b0c1187047ce..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksGetSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksListByMobileNetworkSample.js deleted file mode 100644 index 086cedcb6ad8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksListByMobileNetworkSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listDataNetworksInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksUpdateTagsSample.js deleted file mode 100644 index f6a9b63c2444..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/dataNetworksUpdateTagsSample.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"); - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateDataNetworkTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksCreateOrUpdateSample.js deleted file mode 100644 index 8e0bea03fd6a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksCreateOrUpdateSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksDeleteSample.js deleted file mode 100644 index 56fa80a3b29e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksGetSample.js deleted file mode 100644 index 7174748fe518..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListByResourceGroupSample.js deleted file mode 100644 index 894296601759..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listMobileNetworksInResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListBySubscriptionSample.js deleted file mode 100644 index ba65486ed4b4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = "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); -} - -listMobileNetworksInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListSimIdsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListSimIdsSample.js deleted file mode 100644 index eb989645bae4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksListSimIdsSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * This sample demonstrates how to Lists the IDs of all provisioned SIMs in a mobile network - * - * @summary Lists the IDs of all provisioned SIMs in a mobile network - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimIdListByMobileNetwork.json - */ -async function listTheIDsOfAllProvisionedSimsInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "rg"; - const mobileNetworkName = "testMobileNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginListSimIdsAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -listTheIDsOfAllProvisionedSimsInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksUpdateTagsSample.js deleted file mode 100644 index ce28b6f19aa7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/mobileNetworksUpdateTagsSample.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"); - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateMobileNetworkTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/operationsListSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index 9bed7b1f746c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = "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); -} - -getRegistrationOperations().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/package.json deleted file mode 100644 index 18e2a5eb232d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-mobilenetwork-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/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": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlaneVersionsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlaneVersionsGetSample.js deleted file mode 100644 index 9eb7f4f0e37c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlaneVersionsGetSample.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = "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); -} - -getPacketCoreControlPlaneVersion().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlaneVersionsListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlaneVersionsListByResourceGroupSample.js deleted file mode 100644 index 2ec6dbe46c65..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlaneVersionsListByResourceGroupSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionListByResourceGroup.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = "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.listByResourceGroup()) { - resArray.push(item); - } - console.log(resArray); -} - -getSupportedPacketCoreControlPlaneVersions().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesCreateOrUpdateSample.js deleted file mode 100644 index 0c5cab0ec772..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesCreateOrUpdateSample.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - httpsServerCertificate: { - certificateUrl: "https://contosovault.vault.azure.net/certificates/ingress", - }, - }, - location: "eastus", - mobileNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork", - }, - 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", - }, - }, - sku: "testSku", - 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); -} - -createPacketCoreControlPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesDeleteSample.js deleted file mode 100644 index 3cbc42bad2ff..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesDeleteSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deletePacketCoreControlPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesGetSample.js deleted file mode 100644 index 81d5b006e0c2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesGetSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getPacketCoreControlPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesListByResourceGroupSample.js deleted file mode 100644 index 5adb55c8f7ab..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listPacketCoreControlPlanesInResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesListBySubscriptionSample.js deleted file mode 100644 index e15f602e1dc5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = "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); -} - -listPacketCoreControlPlanesInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesUpdateTagsSample.js deleted file mode 100644 index 48535089f7dd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesUpdateTagsSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updatePacketCoreControlPlaneTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesCreateOrUpdateSample.js deleted file mode 100644 index ba670bec86df..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesCreateOrUpdateSample.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"); - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. - * - * @summary Creates or updates a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createPacketCoreDataPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesDeleteSample.js deleted file mode 100644 index 7d813206a748..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesDeleteSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deletePacketCoreDataPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesGetSample.js deleted file mode 100644 index 31d1a4f4afe2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesGetSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getPacketCoreDataPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.js deleted file mode 100644 index 935e2c3caefe..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesListByPacketCoreControlPlaneSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listPacketCoreDataPlanesInAControlPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesUpdateTagsSample.js deleted file mode 100644 index 23065812112b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreDataPlanesUpdateTagsSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updatePacketCoreDataPlaneTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js deleted file mode 100644 index a72fc85c08ce..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesCreateOrUpdateSample.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"); - -/** - * This sample demonstrates how to Creates or updates a service. - * - * @summary Creates or updates a service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createService().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesDeleteSample.js deleted file mode 100644 index deee1c93e196..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesDeleteSample.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"); - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteService().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesGetSample.js deleted file mode 100644 index 83d8f61f97aa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getService().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesListByMobileNetworkSample.js deleted file mode 100644 index c8c1484734e8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesListByMobileNetworkSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listServicesInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesUpdateTagsSample.js deleted file mode 100644 index e59db335c652..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/servicesUpdateTagsSample.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"); - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateServiceTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsCreateOrUpdateSample.js deleted file mode 100644 index f27778076522..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsCreateOrUpdateSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simGroupName = "testSimGroup"; - const parameters = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey", - }, - 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); -} - -createSimGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsDeleteSample.js deleted file mode 100644 index e8b5f5867909..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsDeleteSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSimGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsGetSample.js deleted file mode 100644 index 72ef9a9e64d4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsGetSample.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSimGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsListByResourceGroupSample.js deleted file mode 100644 index 8c1a372e1688..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listSimGroupsInAResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsListBySubscriptionSample.js deleted file mode 100644 index 70aae1c2bcfd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = "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); -} - -listSimGroupsInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsUpdateTagsSample.js deleted file mode 100644 index 58c7cd83a3fc..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simGroupsUpdateTagsSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateSimGroupTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesCreateOrUpdateSample.js deleted file mode 100644 index 8ee3745dc0eb..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesCreateOrUpdateSample.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * This sample demonstrates how to Creates or updates a SIM policy. - * - * @summary Creates or updates a SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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", - 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); -} - -createSimPolicy().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesDeleteSample.js deleted file mode 100644 index 70cf5c286452..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesDeleteSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSimPolicy().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesGetSample.js deleted file mode 100644 index 7deaaa25a6a7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSimPolicy().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesListByMobileNetworkSample.js deleted file mode 100644 index 3cfbc74c52a6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesListByMobileNetworkSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listSimPoliciesInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesUpdateTagsSample.js deleted file mode 100644 index 719a9b9a1082..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesUpdateTagsSample.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"); - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateSimPolicyTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsCreateOrUpdateSample.js deleted file mode 100644 index 5105f3cc9d81..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsCreateOrUpdateSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsDeleteSample.js deleted file mode 100644 index b289d652405d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsDeleteSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsGetSample.js deleted file mode 100644 index 56d7bfb7835d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListBySimGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListBySimGroupSample.js deleted file mode 100644 index 30cbd5f744aa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListBySimGroupSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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.listBySimGroup(resourceGroupName, simGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listSiMSInASimGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesCreateOrUpdateSample.js deleted file mode 100644 index f7133d2486fd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesCreateOrUpdateSample.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"); - -/** - * This sample demonstrates how to Creates or updates a mobile network site. - * - * @summary Creates or updates a mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters = { - location: "testLocation", - networkFunctions: [ - { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/testNf", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -createMobileNetworkSite().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesDeleteSample.js deleted file mode 100644 index 06fd7e34b869..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesDeleteSample.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"); - -/** - * This sample demonstrates how to Deletes the specified mobile network site. - * - * @summary Deletes the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteMobileNetworkSite().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesGetSample.js deleted file mode 100644 index 23261845eddd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getMobileNetworkSite().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesListByMobileNetworkSample.js deleted file mode 100644 index 3d56866d84f0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesListByMobileNetworkSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listMobileNetworkSitesInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesUpdateTagsSample.js deleted file mode 100644 index bedf5ab2197b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/sitesUpdateTagsSample.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"); - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateMobileNetworkSiteTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesCreateOrUpdateSample.js deleted file mode 100644 index b81bc945ef13..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesCreateOrUpdateSample.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"); - -/** - * This sample demonstrates how to Creates or updates a network slice. - * - * @summary Creates or updates a network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createNetworkSlice().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesDeleteSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesDeleteSample.js deleted file mode 100644 index 5c03d94d73ba..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesDeleteSample.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"); - -/** - * 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/preview/2022-04-01-preview/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteNetworkSlice().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesGetSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesGetSample.js deleted file mode 100644 index 0341f753d9d5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesGetSample.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getNetworkSlice().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesListByMobileNetworkSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesListByMobileNetworkSample.js deleted file mode 100644 index 46b4971d1945..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesListByMobileNetworkSample.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"); - -/** - * 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/preview/2022-04-01-preview/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listNetworkSlicesInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesUpdateTagsSample.js deleted file mode 100644 index e7e901979af8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/slicesUpdateTagsSample.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"); - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateNetworkSliceTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/README.md b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/README.md deleted file mode 100644 index c5f40bf381e5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,183 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [attachedDataNetworksCreateOrUpdateSample.ts][attacheddatanetworkscreateorupdatesample] | Creates or updates an attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkCreate.json | -| [attachedDataNetworksDeleteSample.ts][attacheddatanetworksdeletesample] | Deletes the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkDelete.json | -| [attachedDataNetworksGetSample.ts][attacheddatanetworksgetsample] | Gets information about the specified attached data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/AttachedDataNetworkListByPacketCoreDataPlane.json | -| [attachedDataNetworksUpdateTagsSample.ts][attacheddatanetworksupdatetagssample] | Updates an attached data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkUpdateTags.json | -| [dataNetworksCreateOrUpdateSample.ts][datanetworkscreateorupdatesample] | Creates or updates a data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkCreate.json | -| [dataNetworksDeleteSample.ts][datanetworksdeletesample] | Deletes the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkDelete.json | -| [dataNetworksGetSample.ts][datanetworksgetsample] | Gets information about the specified data network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkGet.json | -| [dataNetworksListByMobileNetworkSample.ts][datanetworkslistbymobilenetworksample] | Lists all data networks in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkListByMobileNetwork.json | -| [dataNetworksUpdateTagsSample.ts][datanetworksupdatetagssample] | Updates data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkUpdateTags.json | -| [mobileNetworksCreateOrUpdateSample.ts][mobilenetworkscreateorupdatesample] | Creates or updates a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkCreate.json | -| [mobileNetworksDeleteSample.ts][mobilenetworksdeletesample] | Deletes the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkDelete.json | -| [mobileNetworksGetSample.ts][mobilenetworksgetsample] | Gets information about the specified mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/MobileNetworkListByResourceGroup.json | -| [mobileNetworksListBySubscriptionSample.ts][mobilenetworkslistbysubscriptionsample] | Lists all the mobile networks in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkListBySubscription.json | -| [mobileNetworksListSimIdsSample.ts][mobilenetworkslistsimidssample] | Lists the IDs of all provisioned SIMs in a mobile network x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimIdListByMobileNetwork.json | -| [mobileNetworksUpdateTagsSample.ts][mobilenetworksupdatetagssample] | Updates mobile network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkUpdateTags.json | -| [operationsListSample.ts][operationslistsample] | Gets a list of the operations. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionGet.json | -| [packetCoreControlPlaneVersionsListByResourceGroupSample.ts][packetcorecontrolplaneversionslistbyresourcegroupsample] | Lists all supported packet core control planes versions. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionListByResourceGroup.json | -| [packetCoreControlPlanesCreateOrUpdateSample.ts][packetcorecontrolplanescreateorupdatesample] | Creates or updates a packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneCreate.json | -| [packetCoreControlPlanesDeleteSample.ts][packetcorecontrolplanesdeletesample] | Deletes the specified packet core control plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/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/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListBySubscription.json | -| [packetCoreControlPlanesUpdateTagsSample.ts][packetcorecontrolplanesupdatetagssample] | Updates packet core control planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneUpdateTags.json | -| [packetCoreDataPlanesCreateOrUpdateSample.ts][packetcoredataplanescreateorupdatesample] | Creates or updates a packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneCreate.json | -| [packetCoreDataPlanesDeleteSample.ts][packetcoredataplanesdeletesample] | Deletes the specified packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json | -| [packetCoreDataPlanesUpdateTagsSample.ts][packetcoredataplanesupdatetagssample] | Updates packet core data planes tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneUpdateTags.json | -| [servicesCreateOrUpdateSample.ts][servicescreateorupdatesample] | Creates or updates a service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceCreate.json | -| [servicesDeleteSample.ts][servicesdeletesample] | Deletes the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceDelete.json | -| [servicesGetSample.ts][servicesgetsample] | Gets information about the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceGet.json | -| [servicesListByMobileNetworkSample.ts][serviceslistbymobilenetworksample] | Gets all the services in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceListByMobileNetwork.json | -| [servicesUpdateTagsSample.ts][servicesupdatetagssample] | Updates service tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceUpdateTags.json | -| [simGroupsCreateOrUpdateSample.ts][simgroupscreateorupdatesample] | Creates or updates a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupCreate.json | -| [simGroupsDeleteSample.ts][simgroupsdeletesample] | Deletes the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupDelete.json | -| [simGroupsGetSample.ts][simgroupsgetsample] | Gets information about the specified SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/SimGroupListByResourceGroup.json | -| [simGroupsListBySubscriptionSample.ts][simgroupslistbysubscriptionsample] | Gets all the SIM groups in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupListBySubscription.json | -| [simGroupsUpdateTagsSample.ts][simgroupsupdatetagssample] | Updates SIM group tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupUpdateTags.json | -| [simPoliciesCreateOrUpdateSample.ts][simpoliciescreateorupdatesample] | Creates or updates a SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyCreate.json | -| [simPoliciesDeleteSample.ts][simpoliciesdeletesample] | Deletes the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyDelete.json | -| [simPoliciesGetSample.ts][simpoliciesgetsample] | Gets information about the specified SIM policy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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/preview/2022-04-01-preview/examples/SimPolicyListByMobileNetwork.json | -| [simPoliciesUpdateTagsSample.ts][simpoliciesupdatetagssample] | Updates SIM policy tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyUpdateTags.json | -| [simsCreateOrUpdateSample.ts][simscreateorupdatesample] | Creates or updates a SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimCreate.json | -| [simsDeleteSample.ts][simsdeletesample] | Deletes the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimDelete.json | -| [simsGetSample.ts][simsgetsample] | Gets information about the specified SIM. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGet.json | -| [simsListBySimGroupSample.ts][simslistbysimgroupsample] | Gets all the SIMs in a SIM group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimListBySimGroup.json | -| [sitesCreateOrUpdateSample.ts][sitescreateorupdatesample] | Creates or updates a mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteCreate.json | -| [sitesDeleteSample.ts][sitesdeletesample] | Deletes the specified mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteDelete.json | -| [sitesGetSample.ts][sitesgetsample] | Gets information about the specified mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteGet.json | -| [sitesListByMobileNetworkSample.ts][siteslistbymobilenetworksample] | Lists all sites in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteListByMobileNetwork.json | -| [sitesUpdateTagsSample.ts][sitesupdatetagssample] | Updates site tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteUpdateTags.json | -| [slicesCreateOrUpdateSample.ts][slicescreateorupdatesample] | Creates or updates a network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceCreate.json | -| [slicesDeleteSample.ts][slicesdeletesample] | Deletes the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceDelete.json | -| [slicesGetSample.ts][slicesgetsample] | Gets information about the specified network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceGet.json | -| [slicesListByMobileNetworkSample.ts][sliceslistbymobilenetworksample] | Lists all slices in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceListByMobileNetwork.json | -| [slicesUpdateTagsSample.ts][slicesupdatetagssample] | Updates slice tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/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 node dist/attachedDataNetworksCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[attacheddatanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts -[attacheddatanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksDeleteSample.ts -[attacheddatanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksGetSample.ts -[attacheddatanetworkslistbypacketcoredataplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts -[attacheddatanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksUpdateTagsSample.ts -[datanetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksCreateOrUpdateSample.ts -[datanetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksDeleteSample.ts -[datanetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksGetSample.ts -[datanetworkslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksListByMobileNetworkSample.ts -[datanetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksUpdateTagsSample.ts -[mobilenetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksCreateOrUpdateSample.ts -[mobilenetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksDeleteSample.ts -[mobilenetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksGetSample.ts -[mobilenetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListByResourceGroupSample.ts -[mobilenetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListBySubscriptionSample.ts -[mobilenetworkslistsimidssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListSimIdsSample.ts -[mobilenetworksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksUpdateTagsSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/operationsListSample.ts -[packetcorecontrolplaneversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlaneVersionsGetSample.ts -[packetcorecontrolplaneversionslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlaneVersionsListByResourceGroupSample.ts -[packetcorecontrolplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts -[packetcorecontrolplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesDeleteSample.ts -[packetcorecontrolplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesGetSample.ts -[packetcorecontrolplaneslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts -[packetcorecontrolplaneslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts -[packetcorecontrolplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts -[packetcoredataplanescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts -[packetcoredataplanesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesDeleteSample.ts -[packetcoredataplanesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesGetSample.ts -[packetcoredataplaneslistbypacketcorecontrolplanesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts -[packetcoredataplanesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesDeleteSample.ts -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesGetSample.ts -[serviceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesListByMobileNetworkSample.ts -[servicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesUpdateTagsSample.ts -[simgroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsCreateOrUpdateSample.ts -[simgroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsDeleteSample.ts -[simgroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsGetSample.ts -[simgroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsListByResourceGroupSample.ts -[simgroupslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsListBySubscriptionSample.ts -[simgroupsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsUpdateTagsSample.ts -[simpoliciescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesCreateOrUpdateSample.ts -[simpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesDeleteSample.ts -[simpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesGetSample.ts -[simpolicieslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesListByMobileNetworkSample.ts -[simpoliciesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesUpdateTagsSample.ts -[simscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsCreateOrUpdateSample.ts -[simsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsDeleteSample.ts -[simsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsGetSample.ts -[simslistbysimgroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListBySimGroupSample.ts -[sitescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesCreateOrUpdateSample.ts -[sitesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesDeleteSample.ts -[sitesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesGetSample.ts -[siteslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesListByMobileNetworkSample.ts -[sitesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesUpdateTagsSample.ts -[slicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesCreateOrUpdateSample.ts -[slicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesDeleteSample.ts -[slicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesGetSample.ts -[sliceslistbymobilenetworksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesListByMobileNetworkSample.ts -[slicesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesUpdateTagsSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mobilenetwork?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/package.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/package.json deleted file mode 100644 index 88577f2b0e8c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-mobilenetwork-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/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": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~4.6.0", - "rimraf": "latest" - } -} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 6450ec1ee78f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts +++ /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. -import { - AttachedDataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates an attached data network. - * - * @summary Creates or updates an attached data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkCreate.json - */ -async function createAttachedDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createAttachedDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksDeleteSample.ts deleted file mode 100644 index 8358b48a0d7a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkDelete.json - */ -async function deleteAttachedDataNetworkResource() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteAttachedDataNetworkResource().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksGetSample.ts deleted file mode 100644 index d7cb67a4980e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkGet.json - */ -async function getAttachedDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getAttachedDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.ts deleted file mode 100644 index 1bd7d0d3d21e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksListByPacketCoreDataPlaneSample.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"; - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkListByPacketCoreDataPlane.json - */ -async function listAttachedDataNetworksInADataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listAttachedDataNetworksInADataPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksUpdateTagsSample.ts deleted file mode 100644 index 4af6c762e172..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/AttachedDataNetworkUpdateTags.json - */ -async function updateAttachedDataNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateAttachedDataNetworkTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index f2db18e2479a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksCreateOrUpdateSample.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 { - DataNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a data network. - * - * @summary Creates or updates a data network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkCreate.json - */ -async function createDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksDeleteSample.ts deleted file mode 100644 index 573b569689c3..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkDelete.json - */ -async function deleteDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksGetSample.ts deleted file mode 100644 index c40fa0755d55..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkGet.json - */ -async function getDataNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getDataNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksListByMobileNetworkSample.ts deleted file mode 100644 index ff01720e9caa..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/DataNetworkListByMobileNetwork.json - */ -async function listDataNetworksInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listDataNetworksInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksUpdateTagsSample.ts deleted file mode 100644 index d10cccc7e1da..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/dataNetworksUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates data network tags. - * - * @summary Updates data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkUpdateTags.json - */ -async function updateDataNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateDataNetworkTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksCreateOrUpdateSample.ts deleted file mode 100644 index fe719b540225..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksCreateOrUpdateSample.ts +++ /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. -import { - MobileNetwork, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkCreate.json - */ -async function createMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksDeleteSample.ts deleted file mode 100644 index 64baabdf0fe9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkDelete.json - */ -async function deleteMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksGetSample.ts deleted file mode 100644 index 9052d00758b7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkGet.json - */ -async function getMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListByResourceGroupSample.ts deleted file mode 100644 index 8b8afe46e09c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkListByResourceGroup.json - */ -async function listMobileNetworksInResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listMobileNetworksInResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListBySubscriptionSample.ts deleted file mode 100644 index caa72d775a6a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/MobileNetworkListBySubscription.json - */ -async function listMobileNetworksInASubscription() { - const subscriptionId = "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); -} - -listMobileNetworksInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListSimIdsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListSimIdsSample.ts deleted file mode 100644 index bfedb3e0fe84..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksListSimIdsSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * This sample demonstrates how to Lists the IDs of all provisioned SIMs in a mobile network - * - * @summary Lists the IDs of all provisioned SIMs in a mobile network - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimIdListByMobileNetwork.json - */ -async function listTheIDsOfAllProvisionedSimsInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "rg"; - const mobileNetworkName = "testMobileNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.mobileNetworks.beginListSimIdsAndWait( - resourceGroupName, - mobileNetworkName - ); - console.log(result); -} - -listTheIDsOfAllProvisionedSimsInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksUpdateTagsSample.ts deleted file mode 100644 index 53e9e970474e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/mobileNetworksUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates mobile network tags. - * - * @summary Updates mobile network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkUpdateTags.json - */ -async function updateMobileNetworkTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateMobileNetworkTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index ea40248d2fca..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/OperationList.json - */ -async function getRegistrationOperations() { - const subscriptionId = "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); -} - -getRegistrationOperations().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlaneVersionsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlaneVersionsGetSample.ts deleted file mode 100644 index 8cb8e00c4807..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlaneVersionsGetSample.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionGet.json - */ -async function getPacketCoreControlPlaneVersion() { - const subscriptionId = "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); -} - -getPacketCoreControlPlaneVersion().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlaneVersionsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlaneVersionsListByResourceGroupSample.ts deleted file mode 100644 index 40fd39857e2b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlaneVersionsListByResourceGroupSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionListByResourceGroup.json - */ -async function getSupportedPacketCoreControlPlaneVersions() { - const subscriptionId = "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.listByResourceGroup()) { - resArray.push(item); - } - console.log(resArray); -} - -getSupportedPacketCoreControlPlaneVersions().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts deleted file mode 100644 index 2cb66a47df6a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.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 { - PacketCoreControlPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters: PacketCoreControlPlane = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - localDiagnosticsAccess: { - httpsServerCertificate: { - certificateUrl: - "https://contosovault.vault.azure.net/certificates/ingress" - } - }, - location: "eastus", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - }, - 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" - } - }, - sku: "testSku", - 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); -} - -createPacketCoreControlPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesDeleteSample.ts deleted file mode 100644 index b4f9a00a92bc..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneDelete.json - */ -async function deletePacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deletePacketCoreControlPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesGetSample.ts deleted file mode 100644 index e94512564a31..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesGetSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneGet.json - */ -async function getPacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getPacketCoreControlPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts deleted file mode 100644 index ce9eb048872a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListByResourceGroup.json - */ -async function listPacketCoreControlPlanesInResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listPacketCoreControlPlanesInResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts deleted file mode 100644 index 4c099bc55d90..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListBySubscription.json - */ -async function listPacketCoreControlPlanesInASubscription() { - const subscriptionId = "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); -} - -listPacketCoreControlPlanesInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesUpdateTagsSample.ts deleted file mode 100644 index c222c473b6ef..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreControlPlaneUpdateTags.json - */ -async function updatePacketCoreControlPlaneTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updatePacketCoreControlPlaneTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.ts deleted file mode 100644 index 287542f5914a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesCreateOrUpdateSample.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 { - PacketCoreDataPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a packet core data plane. - * - * @summary Creates or updates a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneCreate.json - */ -async function createPacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createPacketCoreDataPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesDeleteSample.ts deleted file mode 100644 index b5023d011a83..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneDelete.json - */ -async function deletePacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deletePacketCoreDataPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesGetSample.ts deleted file mode 100644 index f3188888dce0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneGet.json - */ -async function getPacketCoreDataPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getPacketCoreDataPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts deleted file mode 100644 index 2a4ac528235a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json - */ -async function listPacketCoreDataPlanesInAControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listPacketCoreDataPlanesInAControlPlane().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesUpdateTagsSample.ts deleted file mode 100644 index 29e31b31776e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreDataPlanesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/PacketCoreDataPlaneUpdateTags.json - */ -async function updatePacketCoreDataPlaneTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updatePacketCoreDataPlaneTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts deleted file mode 100644 index e42179932eae..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * This sample demonstrates how to Creates or updates a service. - * - * @summary Creates or updates a service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceCreate.json - */ -async function createService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createService().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesDeleteSample.ts deleted file mode 100644 index 7ef2bfc505e6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified service. - * - * @summary Deletes the specified service. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceDelete.json - */ -async function deleteService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteService().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesGetSample.ts deleted file mode 100644 index 5b5878aab899..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/ServiceGet.json - */ -async function getService() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getService().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesListByMobileNetworkSample.ts deleted file mode 100644 index cf02962ca82b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/ServiceListByMobileNetwork.json - */ -async function listServicesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listServicesInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesUpdateTagsSample.ts deleted file mode 100644 index 9f408af1a13d..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/servicesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates service tags. - * - * @summary Updates service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceUpdateTags.json - */ -async function updateServiceTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateServiceTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 73a9dd5ee370..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsCreateOrUpdateSample.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 { - SimGroup, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupCreate.json - */ -async function createSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simGroupName = "testSimGroup"; - const parameters: SimGroup = { - encryptionKey: { - keyUrl: "https://contosovault.vault.azure.net/keys/azureKey" - }, - 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); -} - -createSimGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsDeleteSample.ts deleted file mode 100644 index ddeb8eae3ffd..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsDeleteSample.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupDelete.json - */ -async function deleteSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSimGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsGetSample.ts deleted file mode 100644 index 290c6495474e..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupGet.json - */ -async function getSimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSimGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsListByResourceGroupSample.ts deleted file mode 100644 index d95e6ce3ade9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupListByResourceGroup.json - */ -async function listSimGroupsInAResourceGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listSimGroupsInAResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsListBySubscriptionSample.ts deleted file mode 100644 index a7b451e1b56c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGroupListBySubscription.json - */ -async function listSimGroupsInASubscription() { - const subscriptionId = "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); -} - -listSimGroupsInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsUpdateTagsSample.ts deleted file mode 100644 index fa28f97cd2c1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simGroupsUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates SIM group tags. - * - * @summary Updates SIM group tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupUpdateTags.json - */ -async function updateSimGroupTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateSimGroupTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index eff49d47a0e1..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesCreateOrUpdateSample.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * This sample demonstrates how to Creates or updates a SIM policy. - * - * @summary Creates or updates a SIM policy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyCreate.json - */ -async function createSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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", - 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); -} - -createSimPolicy().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesDeleteSample.ts deleted file mode 100644 index 7cea595b2902..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyDelete.json - */ -async function deleteSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSimPolicy().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesGetSample.ts deleted file mode 100644 index 8eee093135d8..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyGet.json - */ -async function getSimPolicy() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSimPolicy().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesListByMobileNetworkSample.ts deleted file mode 100644 index f651e0944573..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimPolicyListByMobileNetwork.json - */ -async function listSimPoliciesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listSimPoliciesInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesUpdateTagsSample.ts deleted file mode 100644 index e38e4cafd832..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates SIM policy tags. - * - * @summary Updates SIM policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyUpdateTags.json - */ -async function updateSimPolicyTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateSimPolicyTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsCreateOrUpdateSample.ts deleted file mode 100644 index 9a41d22ea90a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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"; - -/** - * 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/preview/2022-04-01-preview/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsDeleteSample.ts deleted file mode 100644 index 11225c0c1413..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified SIM. - * - * @summary Deletes the specified SIM. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsGetSample.ts deleted file mode 100644 index c3fa1f3ed166..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListBySimGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListBySimGroupSample.ts deleted file mode 100644 index 5b327f24d1da..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListBySimGroupSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SimListBySimGroup.json - */ -async function listSiMSInASimGroup() { - const subscriptionId = "subid"; - const resourceGroupName = "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.listBySimGroup( - resourceGroupName, - simGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listSiMSInASimGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesCreateOrUpdateSample.ts deleted file mode 100644 index dc9619730bad..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesCreateOrUpdateSample.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 { Site, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a mobile network site. - * - * @summary Creates or updates a mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteCreate.json - */ -async function createMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const mobileNetworkName = "testMobileNetwork"; - const siteName = "testSite"; - const parameters: Site = { - location: "testLocation", - networkFunctions: [ - { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/testNf" - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sites.beginCreateOrUpdateAndWait( - resourceGroupName, - mobileNetworkName, - siteName, - parameters - ); - console.log(result); -} - -createMobileNetworkSite().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesDeleteSample.ts deleted file mode 100644 index b2038fb77fab..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified mobile network site. - * - * @summary Deletes the specified mobile network site. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteDelete.json - */ -async function deleteMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteMobileNetworkSite().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesGetSample.ts deleted file mode 100644 index 97396aa3df45..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SiteGet.json - */ -async function getMobileNetworkSite() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getMobileNetworkSite().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesListByMobileNetworkSample.ts deleted file mode 100644 index 98a0e0fe8f09..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SiteListByMobileNetwork.json - */ -async function listMobileNetworkSitesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listMobileNetworkSitesInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesUpdateTagsSample.ts deleted file mode 100644 index c10c5e81b768..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/sitesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates site tags. - * - * @summary Updates site tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteUpdateTags.json - */ -async function updateMobileNetworkSiteTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateMobileNetworkSiteTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesCreateOrUpdateSample.ts deleted file mode 100644 index 2928c5d55e8a..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesCreateOrUpdateSample.ts +++ /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. -import { Slice, MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a network slice. - * - * @summary Creates or updates a network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceCreate.json - */ -async function createNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -createNetworkSlice().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesDeleteSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesDeleteSample.ts deleted file mode 100644 index 36a51125fdc4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesDeleteSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SliceDelete.json - */ -async function deleteNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -deleteNetworkSlice().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesGetSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesGetSample.ts deleted file mode 100644 index 9453d5ac51b7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesGetSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SliceGet.json - */ -async function getNetworkSlice() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -getNetworkSlice().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesListByMobileNetworkSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesListByMobileNetworkSample.ts deleted file mode 100644 index c64fd8e9df16..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesListByMobileNetworkSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * 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/preview/2022-04-01-preview/examples/SliceListByMobileNetwork.json - */ -async function listNetworkSlicesInAMobileNetwork() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -listNetworkSlicesInAMobileNetwork().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesUpdateTagsSample.ts deleted file mode 100644 index 3620b94dc435..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/slicesUpdateTagsSample.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 { - TagsObject, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Updates slice tags. - * - * @summary Updates slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceUpdateTags.json - */ -async function updateNetworkSliceTags() { - const subscriptionId = "subid"; - const resourceGroupName = "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); -} - -updateNetworkSliceTags().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/tsconfig.json b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "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/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/index.ts index 98c93e869cc9..8bfc50717191 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/index.ts @@ -7,6 +7,7 @@ */ /// +export { getContinuationToken } from "./pagingHelper"; export * from "./models"; export { MobileNetworkManagementClient } from "./mobileNetworkManagementClient"; export * from "./operationsInterfaces"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts index db8e7a026ede..bc854f961219 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts @@ -18,30 +18,34 @@ import { AttachedDataNetworksImpl, DataNetworksImpl, MobileNetworksImpl, - SitesImpl, - SimGroupsImpl, - SimsImpl, OperationsImpl, PacketCoreControlPlanesImpl, + PacketCoreControlPlaneOperationsImpl, PacketCoreControlPlaneVersionsImpl, PacketCoreDataPlanesImpl, ServicesImpl, + SimsImpl, + SimOperationsImpl, + SimGroupsImpl, SimPoliciesImpl, + SitesImpl, SlicesImpl } from "./operations"; import { AttachedDataNetworks, DataNetworks, MobileNetworks, - Sites, - SimGroups, - Sims, Operations, PacketCoreControlPlanes, + PacketCoreControlPlaneOperations, PacketCoreControlPlaneVersions, PacketCoreDataPlanes, Services, + Sims, + SimOperations, + SimGroups, SimPolicies, + Sites, Slices } from "./operationsInterfaces"; import { MobileNetworkManagementClientOptionalParams } from "./models"; @@ -78,22 +82,19 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mobilenetwork/1.0.0-beta.4`; + const packageDetails = `azsdk-js-arm-mobilenetwork/1.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - if (!options.credentialScopes) { - options.credentialScopes = ["https://management.azure.com/.default"]; - } const optionsWithDefaults = { ...defaults, ...options, userAgentOptions: { userAgentPrefix }, - baseUri: + endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com" }; super(optionsWithDefaults); @@ -119,7 +120,9 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge @@ -132,21 +135,25 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-04-01-preview"; + this.apiVersion = options.apiVersion || "2022-11-01"; this.attachedDataNetworks = new AttachedDataNetworksImpl(this); this.dataNetworks = new DataNetworksImpl(this); this.mobileNetworks = new MobileNetworksImpl(this); - this.sites = new SitesImpl(this); - this.simGroups = new SimGroupsImpl(this); - this.sims = new SimsImpl(this); this.operations = new OperationsImpl(this); this.packetCoreControlPlanes = new PacketCoreControlPlanesImpl(this); + this.packetCoreControlPlaneOperations = new PacketCoreControlPlaneOperationsImpl( + this + ); this.packetCoreControlPlaneVersions = new PacketCoreControlPlaneVersionsImpl( this ); this.packetCoreDataPlanes = new PacketCoreDataPlanesImpl(this); this.services = new ServicesImpl(this); + this.sims = new SimsImpl(this); + this.simOperations = new SimOperationsImpl(this); + this.simGroups = new SimGroupsImpl(this); this.simPolicies = new SimPoliciesImpl(this); + this.sites = new SitesImpl(this); this.slices = new SlicesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -182,14 +189,16 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { attachedDataNetworks: AttachedDataNetworks; dataNetworks: DataNetworks; mobileNetworks: MobileNetworks; - sites: Sites; - simGroups: SimGroups; - sims: Sims; operations: Operations; packetCoreControlPlanes: PacketCoreControlPlanes; + packetCoreControlPlaneOperations: PacketCoreControlPlaneOperations; packetCoreControlPlaneVersions: PacketCoreControlPlaneVersions; packetCoreDataPlanes: PacketCoreDataPlanes; services: Services; + sims: Sims; + simOperations: SimOperations; + simGroups: SimGroups; simPolicies: SimPolicies; + sites: Sites; slices: Slices; } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts index 070942b1555f..d65a6509cb44 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts @@ -79,7 +79,7 @@ export interface NaptConfiguration { * (Ports under 1,024 should not be used because these are special purpose ports reserved by IANA. Ports 50,000 and above are reserved for non-NAPT use.) */ portRange?: PortRange; - /** The minimum time (in seconds) that will pass before a port that was used by a closed pinhole can be recycled for use by another pinhole. All hold times must be minimum 1 second. */ + /** The minimum time (in seconds) that will pass before a port that was used by a closed pinhole can be recycled for use by another pinhole. All hold times must be at least 1 second. */ portReuseHoldTime?: PortReuseHoldTimes; /** Maximum number of UDP and TCP pinholes that can be open simultaneously on the core interface. For 5G networks, this is the N6 interface. For 4G networks, this is the SGi interface. */ pinholeLimits?: number; @@ -109,11 +109,11 @@ export interface PortReuseHoldTimes { /** Expiry times of inactive NAPT pinholes, in seconds. All timers must be at least 1 second. */ export interface PinholeTimeouts { - /** Pinhole timeout for TCP pinholes in seconds. Default for TCP is 2 hours 4 minutes, as per RFC 5382 section 5. */ + /** Pinhole timeout for TCP pinholes in seconds. Default for TCP is 3 minutes. */ tcp?: number; - /** Pinhole timeout for UDP pinholes in seconds. Default for UDP is 5 minutes, as per RFC 4787 section 4.3. */ + /** Pinhole timeout for UDP pinholes in seconds. Default for UDP is 30 seconds. */ udp?: number; - /** Pinhole timeout for ICMP pinholes in seconds. Default for ICMP Echo is 60 seconds, as per RFC 5508 section 3.2. */ + /** Pinhole timeout for ICMP pinholes in seconds. Default for ICMP Echo is 30 seconds. */ icmp?: number; } @@ -204,134 +204,6 @@ export interface MobileNetworkListResult { readonly nextLink?: string; } -/** Response for list SIM IDs API service call. */ -export interface SimIdListResult { - /** A list of SIM IDs. */ - value?: SubResource[]; - /** - * 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; -} - -/** Reference to another sub resource. */ -export interface SubResource { - /** Resource ID. */ - id: string; -} - -/** Response for sites API service call. */ -export interface SiteListResult { - /** A list of sites in a mobile network. */ - value?: Site[]; - /** - * 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; -} - -/** An Azure key vault key. */ -export interface KeyVaultKey { - /** The key URL, unversioned. For example: https://contosovault.vault.azure.net/keys/azureKey. */ - keyUrl?: string; -} - -/** Reference to a mobile network resource. */ -export interface MobileNetworkResourceId { - /** Mobile network resource ID. */ - id: string; -} - -/** Managed service identity (system assigned and/or user assigned identities) */ -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: 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 }; -} - -/** User assigned identity properties */ -export interface UserAssignedIdentity { - /** - * The principal ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} - -/** Response for list SIM groups API service call. */ -export interface SimGroupListResult { - /** A list of SIM groups in a resource group. */ - value?: SimGroup[]; - /** - * 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; -} - -/** Reference to a SIM policy resource. */ -export interface SimPolicyResourceId { - /** SIM policy resource ID. */ - id: string; -} - -/** Static IP configuration for a SIM, scoped to a particular attached data network and slice. */ -export interface SimStaticIpProperties { - /** The attached data network on which the static IP address will be used. The combination of attached data network and slice defines the network scope of the IP address. */ - attachedDataNetwork?: AttachedDataNetworkResourceId; - /** The network slice on which the static IP address will be used. The combination of attached data network and slice defines the network scope of the IP address. */ - slice?: SliceResourceId; - /** The static IP configuration for the SIM to use at the defined network scope. */ - staticIp?: SimStaticIpPropertiesStaticIp; -} - -/** Reference to an attached data network resource. */ -export interface AttachedDataNetworkResourceId { - /** Attached data network resource ID. */ - id: string; -} - -/** Reference to a slice resource. */ -export interface SliceResourceId { - /** Slice resource ID. */ - id: string; -} - -/** The static IP configuration for the SIM to use at the defined network scope. */ -export interface SimStaticIpPropertiesStaticIp { - /** The IPv4 address assigned to the SIM at this network scope. This address must be in the userEquipmentStaticAddressPoolPrefix defined in the attached data network. */ - ipv4Address?: string; -} - -/** Response for list SIMs API service call. */ -export interface SimListResult { - /** A list of SIMs in a resource group. */ - value?: Sim[]; - /** - * 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; -} - /** List of the operations. */ export interface OperationList { /** @@ -374,24 +246,57 @@ export interface OperationDisplay { description?: 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; +} + +/** Reference to an Azure Async Operation ID. */ +export interface AsyncOperationId { + /** Azure Async Operation ID. */ + id: string; +} + +/** Reference to a site resource. */ +export interface SiteResourceId { + /** Site resource ID. */ + id: string; +} + /** The platform where the packet core is deployed. */ export interface PlatformConfiguration { /** The platform type where packet core is deployed. */ type: PlatformType; - /** The Azure Stack Edge device where where the packet core is deployed. If the device is part of a fault tolerant pair, either device in the pair can be specified. */ + /** The Azure Stack Edge device where the packet core is deployed. If the device is part of a fault tolerant pair, either device in the pair can be specified. */ azureStackEdgeDevice?: AzureStackEdgeDeviceResourceId; + /** + * The Azure Stack Edge devices where the packet core is deployed. If the packet core is deployed across multiple devices, all devices will appear in this list. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly azureStackEdgeDevices?: AzureStackEdgeDeviceResourceId[]; + /** The Azure Stack HCI cluster where the packet core is deployed. */ + azureStackHciCluster?: AzureStackHCIClusterResourceId; /** Azure Arc connected cluster where the packet core is deployed. */ connectedCluster?: ConnectedClusterResourceId; /** Azure Arc custom location where the packet core is deployed. */ customLocation?: CustomLocationResourceId; } -/** Reference to an Azure Arc custom location resource. */ +/** Reference to an Azure Stack Edge device resource. */ export interface AzureStackEdgeDeviceResourceId { /** Azure Stack Edge device resource ID. */ id: string; } +/** Reference to an Azure Stack HCI cluster resource. */ +export interface AzureStackHCIClusterResourceId { + /** Azure Stack HCI cluster resource ID. */ + id: string; +} + /** Reference to an Azure Arc custom location resource. */ export interface ConnectedClusterResourceId { /** Azure Arc connected cluster resource ID. */ @@ -406,14 +311,67 @@ export interface CustomLocationResourceId { /** The kubernetes ingress configuration to control access to packet core diagnostics over local APIs. */ export interface LocalDiagnosticsAccessConfiguration { + /** How to authenticate users who access local diagnostics APIs. */ + authenticationType: AuthenticationType; /** The HTTPS server TLS certificate used to secure local access to diagnostics. */ - httpsServerCertificate?: KeyVaultCertificate; + httpsServerCertificate?: HttpsServerCertificate; } -/** An Azure key vault certificate. */ -export interface KeyVaultCertificate { +/** HTTPS server certificate configuration. */ +export interface HttpsServerCertificate { /** The certificate URL, unversioned. For example: https://contosovault.vault.azure.net/certificates/ingress. */ - certificateUrl?: string; + certificateUrl: string; + /** + * The provisioning state of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioning?: CertificateProvisioning; +} + +/** Certificate provisioning state */ +export interface CertificateProvisioning { + /** + * The certificate's provisioning state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: CertificateProvisioningState; + /** + * Reason for certificate provisioning failure. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reason?: string; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +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: 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 }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; } /** Response for packet core control planes API service call. */ @@ -427,6 +385,50 @@ 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. */ + storageAccountBlobUrl: string; +} + +/** Platform specific packet core control plane version properties. */ +export interface Platform { + /** The platform type where this version can be deployed. */ + platformType?: PlatformType; + /** The state of this packet core control plane version on this platform. */ + versionState?: VersionState; + /** The minimum software version of the platform where this packet core version can be deployed. */ + minimumPlatformSoftwareVersion?: string; + /** The maximum software version of the platform where this packet core version can be deployed. */ + maximumPlatformSoftwareVersion?: string; + /** Indicates whether this is the recommended version for this platform. */ + recommendedVersion?: RecommendedVersion; + /** Indicates whether this version is obsoleted for this platform. */ + obsoleteVersion?: ObsoleteVersion; +} + /** Response for packet core control plane version API service call. */ export interface PacketCoreControlPlaneVersionListResult { /** A list of supported packet core control plane versions. */ @@ -510,11 +512,240 @@ export interface ServiceListResult { readonly nextLink?: string; } +/** Common SIM properties. */ +export interface CommonSimPropertiesFormat { + /** + * The provisioning state of the SIM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The state of the SIM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly simState?: SimState; + /** + * A dictionary of sites to the provisioning state of this SIM on that site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; + /** The international mobile subscriber identity (IMSI) for the SIM. */ + internationalMobileSubscriberIdentity: string; + /** The integrated circuit card ID (ICCID) for the SIM. */ + integratedCircuitCardIdentifier?: string; + /** An optional free-form text field that can be used to record the device type this SIM is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on this value. */ + deviceType?: string; + /** The SIM policy used by this SIM. The SIM policy must be in the same location as the SIM. */ + simPolicy?: SimPolicyResourceId; + /** A list of static IP addresses assigned to this SIM. Each address is assigned at a defined network scope, made up of {attached data network, slice}. */ + staticIpConfiguration?: SimStaticIpProperties[]; + /** + * The name of the SIM vendor who provided this SIM, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vendorName?: string; + /** + * The public key fingerprint of the SIM vendor who provided this SIM, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vendorKeyFingerprint?: string; +} + +/** Reference to a SIM policy resource. */ +export interface SimPolicyResourceId { + /** SIM policy resource ID. */ + id: string; +} + +/** Static IP configuration for a SIM, scoped to a particular attached data network and slice. */ +export interface SimStaticIpProperties { + /** The attached data network on which the static IP address will be used. The combination of attached data network and slice defines the network scope of the IP address. The attached data network must be in the same location as the SIM. */ + attachedDataNetwork?: AttachedDataNetworkResourceId; + /** The network slice on which the static IP address will be used. The combination of attached data network and slice defines the network scope of the IP address. The slice must be in the same location as the SIM. */ + slice?: SliceResourceId; + /** The static IP configuration for the SIM to use at the defined network scope. */ + staticIp?: SimStaticIpPropertiesStaticIp; +} + +/** Reference to an attached data network resource. */ +export interface AttachedDataNetworkResourceId { + /** Attached data network resource ID. */ + id: string; +} + +/** Reference to a slice resource. */ +export interface SliceResourceId { + /** Slice resource ID. */ + id: string; +} + +/** The static IP configuration for the SIM to use at the defined network scope. */ +export interface SimStaticIpPropertiesStaticIp { + /** The IPv4 address assigned to the SIM at this network scope. This address must be in the userEquipmentStaticAddressPoolPrefix defined in the attached data network. */ + ipv4Address?: string; +} + +/** Response for list SIMs API service call. */ +export interface SimListResult { + /** A list of SIMs in a resource group. */ + value?: Sim[]; + /** + * 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 SIMs to upload. */ +export interface SimUploadList { + /** A list of SIMs to upload. */ + sims: SimNameAndProperties[]; +} + +/** SIM name and properties. */ +export interface SimNameAndProperties { + /** The name of the SIM. */ + name: string; + /** + * The provisioning state of the SIM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The state of the SIM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly simState?: SimState; + /** + * A dictionary of sites to the provisioning state of this SIM on that site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; + /** The international mobile subscriber identity (IMSI) for the SIM. */ + internationalMobileSubscriberIdentity: string; + /** The integrated circuit card ID (ICCID) for the SIM. */ + integratedCircuitCardIdentifier?: string; + /** An optional free-form text field that can be used to record the device type this SIM is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on this value. */ + deviceType?: string; + /** The SIM policy used by this SIM. The SIM policy must be in the same location as the SIM. */ + simPolicy?: SimPolicyResourceId; + /** A list of static IP addresses assigned to this SIM. Each address is assigned at a defined network scope, made up of {attached data network, slice}. */ + staticIpConfiguration?: SimStaticIpProperties[]; + /** + * The name of the SIM vendor who provided this SIM, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vendorName?: string; + /** + * The public key fingerprint of the SIM vendor who provided this SIM, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vendorKeyFingerprint?: string; + /** The Ki value for the SIM. */ + authenticationKey?: string; + /** The Opc value for the SIM. */ + operatorKeyCode?: string; +} + +/** The SIMs to delete. */ +export interface SimDeleteList { + /** A list of SIM resource names to delete. */ + sims: string[]; +} + +/** The SIMs to upload. The SIM credentials must be encrypted. */ +export interface EncryptedSimUploadList { + /** The upload file format version. */ + version: number; + /** An identifier for the Azure SIM onboarding public key used for encrypted upload. */ + azureKeyIdentifier: number; + /** The fingerprint of the SIM vendor public key. The private counterpart is used for signing the encrypted transport key. */ + vendorKeyFingerprint: string; + /** The transport key used for encrypting SIM credentials, encrypted using the SIM onboarding public key. */ + encryptedTransportKey: string; + /** The encrypted transport key, signed using the SIM vendor private key. */ + signedTransportKey: string; + /** A list of SIMs to upload, with encrypted properties. */ + sims: SimNameAndEncryptedProperties[]; +} + +/** SIM name and encrypted properties. */ +export interface SimNameAndEncryptedProperties { + /** The name of the SIM. */ + name: string; + /** + * The provisioning state of the SIM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The state of the SIM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly simState?: SimState; + /** + * A dictionary of sites to the provisioning state of this SIM on that site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; + /** The international mobile subscriber identity (IMSI) for the SIM. */ + internationalMobileSubscriberIdentity: string; + /** The integrated circuit card ID (ICCID) for the SIM. */ + integratedCircuitCardIdentifier?: string; + /** An optional free-form text field that can be used to record the device type this SIM is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on this value. */ + deviceType?: string; + /** The SIM policy used by this SIM. The SIM policy must be in the same location as the SIM. */ + simPolicy?: SimPolicyResourceId; + /** A list of static IP addresses assigned to this SIM. Each address is assigned at a defined network scope, made up of {attached data network, slice}. */ + staticIpConfiguration?: SimStaticIpProperties[]; + /** + * The name of the SIM vendor who provided this SIM, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vendorName?: string; + /** + * The public key fingerprint of the SIM vendor who provided this SIM, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vendorKeyFingerprint?: string; + /** The encrypted SIM credentials. */ + encryptedCredentials?: string; +} + +/** An Azure key vault key. */ +export interface KeyVaultKey { + /** The key URL, unversioned. For example: https://contosovault.vault.azure.net/keys/azureKey. */ + keyUrl?: string; +} + +/** Reference to a mobile network resource. */ +export interface MobileNetworkResourceId { + /** Mobile network resource ID. */ + id: string; +} + +/** Response for list SIM groups API service call. */ +export interface SimGroupListResult { + /** A list of SIM groups in a resource group. */ + value?: SimGroup[]; + /** + * 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; +} + /** Per-slice settings */ export interface SliceConfiguration { - /** A reference to the slice that these settings apply to */ + /** A reference to the slice that these settings apply to. The slice must be in the same location as the SIM policy. */ slice: SliceResourceId; - /** The default data network to use if the UE does not explicitly specify it. Configuration for this object must exist in the `dataNetworkConfigurations` map. */ + /** The default data network to use if the UE does not explicitly specify it. Configuration for this object must exist in the `dataNetworkConfigurations` map. The data network must be in the same location as the SIM policy. */ defaultDataNetwork: DataNetworkResourceId; /** The allowed data networks and the settings to use for them. The list must not contain duplicate items and must contain at least one item. */ dataNetworkConfigurations: DataNetworkConfiguration[]; @@ -528,7 +759,7 @@ export interface DataNetworkResourceId { /** Settings controlling data network use */ export interface DataNetworkConfiguration { - /** A reference to the data network that these settings apply to */ + /** A reference to the data network that these settings apply to. The data network must be in the same location as the SIM policy. */ 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; @@ -544,8 +775,10 @@ export interface DataNetworkConfiguration { defaultSessionType?: PduSessionType; /** Allowed session types in addition to the default session type. Must not duplicate the default session type. */ additionalAllowedSessionTypes?: PduSessionType[]; - /** List of services that can be used as part of this SIM policy. The list must not contain duplicate items and must contain at least one item. */ + /** List of services that can be used as part of this SIM policy. The list must not contain duplicate items and must contain at least one item. The services must be in the same location as the SIM policy. */ allowedServices: ServiceResourceId[]; + /** The maximum number of downlink packets to buffer at the user plane for High Latency Communication - Extended Buffering. See 3GPP TS29.272 v15.10.0 section 7.3.188 for a full description. This maximum is not guaranteed because there is a internal limit on buffered packets across all PDU sessions. */ + maximumNumberOfBufferedPackets?: number; } /** Reference to a service resource. */ @@ -565,6 +798,23 @@ export interface SimPolicyListResult { readonly nextLink?: string; } +/** Reference to another sub resource. */ +export interface SubResource { + /** Resource ID. */ + id: string; +} + +/** Response for sites API service call. */ +export interface SiteListResult { + /** A list of sites in a mobile network. */ + value?: Site[]; + /** + * 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; +} + /** Single-network slice selection assistance information (S-NSSAI). */ export interface Snssai { /** Slice/service type (SST). */ @@ -617,7 +867,22 @@ export interface PccRuleQosPolicy extends QosPolicy { guaranteedBitRate?: Ambr; } -/** Attached data network resource. */ +/** SIM properties. */ +export interface SimPropertiesFormat extends CommonSimPropertiesFormat { + /** The Ki value for the SIM. */ + authenticationKey?: string; + /** The Opc value for the SIM. */ + operatorKeyCode?: string; +} + +/** Encrypted SIM properties. */ +export interface EncryptedSimPropertiesFormat + extends CommonSimPropertiesFormat { + /** The encrypted SIM credentials. */ + encryptedCredentials?: string; +} + +/** Attached data network resource. Must be created in the same location as its parent packet core data plane. */ export interface AttachedDataNetwork extends TrackedResource { /** * The provisioning state of the attached data network resource. @@ -626,8 +891,8 @@ export interface AttachedDataNetwork extends TrackedResource { readonly provisioningState?: ProvisioningState; /** The user plane interface on the data network. For 5G networks, this is the N6 interface. For 4G networks, this is the SGi interface. */ userPlaneDataInterface: InterfaceProperties; - /** The DNS servers to signal to UEs to use for this attached data network. */ - dnsAddresses?: string[]; + /** The DNS servers to signal to UEs to use for this attached data network. This configuration is mandatory - if you don't want DNS servers, you must provide an empty array. */ + dnsAddresses: string[]; /** * The network address and port translation (NAPT) configuration. * If this is not specified, the attached data network will use a default NAPT configuration with NAPT enabled. @@ -647,7 +912,7 @@ export interface AttachedDataNetwork extends TrackedResource { userEquipmentStaticAddressPoolPrefix?: string[]; } -/** Data network resource. */ +/** Data network resource. Must be created in the same location as its parent mobile network. */ export interface DataNetwork extends TrackedResource { /** * The provisioning state of the data network resource. @@ -674,32 +939,6 @@ export interface MobileNetwork extends TrackedResource { readonly serviceKey?: string; } -/** Site resource. */ -export interface Site extends TrackedResource { - /** - * The provisioning state of the site resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** An array of IDs of the network functions deployed on the site, maintained by the user. */ - networkFunctions?: SubResource[]; -} - -/** SIM group resource. */ -export interface SimGroup extends TrackedResource { - /** The identity used to retrieve the encryption key from Azure key vault. */ - identity?: ManagedServiceIdentity; - /** - * The provisioning state of the SIM group resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** A key to encrypt the SIM data that belongs to this SIM group. */ - encryptionKey?: KeyVaultKey; - /** Mobile network that this SIM belongs to */ - mobileNetwork?: MobileNetworkResourceId; -} - /** Packet core control plane resource. */ export interface PacketCoreControlPlane extends TrackedResource { /** The identity used to retrieve the ingress certificate from Azure key vault. */ @@ -709,25 +948,37 @@ export interface PacketCoreControlPlane extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** Mobile network in which this packet core control plane is deployed. */ - mobileNetwork: MobileNetworkResourceId; + /** + * 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; + /** 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; + 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. */ version?: 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. + */ + readonly rollbackVersion?: string; /** The control plane interface on the access network. For 5G networks, this is the N2 interface. For 4G networks, this is the S1-MME interface. */ controlPlaneAccessInterface: InterfaceProperties; /** The SKU defining the throughput and SIM allowances for this packet core control plane deployment. */ sku: BillingSku; + /** The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links for all data networks. The MTU set on the user plane access link is calculated to be 60 bytes greater than this value to allow for GTP encapsulation. */ + ueMtu?: number; /** The kubernetes ingress configuration to control access to packet core diagnostics over local APIs. */ - localDiagnosticsAccess?: LocalDiagnosticsAccessConfiguration; + localDiagnosticsAccess: LocalDiagnosticsAccessConfiguration; /** Settings to allow interoperability with third party components e.g. RANs and UEs. */ interopSettings?: Record; } -/** Packet core data plane resource. */ +/** Packet core data plane resource. Must be created in the same location as its parent packet core control plane. */ export interface PacketCoreDataPlane extends TrackedResource { /** * The provisioning state of the packet core data plane resource. @@ -738,7 +989,7 @@ export interface PacketCoreDataPlane extends TrackedResource { userPlaneAccessInterface: InterfaceProperties; } -/** Service resource. */ +/** Service resource. Must be created in the same location as its parent mobile network. */ export interface Service extends TrackedResource { /** * The provisioning state of the service resource. @@ -753,6 +1004,21 @@ export interface Service extends TrackedResource { pccRules: PccRuleConfiguration[]; } +/** SIM group resource. */ +export interface SimGroup extends TrackedResource { + /** The identity used to retrieve the encryption key from Azure key vault. */ + identity?: ManagedServiceIdentity; + /** + * The provisioning state of the SIM group resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** A key to encrypt the SIM data that belongs to this SIM group. */ + encryptionKey?: KeyVaultKey; + /** Mobile network that this SIM group belongs to. The mobile network must be in the same location as the SIM group. */ + mobileNetwork?: MobileNetworkResourceId; +} + /** SIM policy resource. */ export interface SimPolicy extends TrackedResource { /** @@ -760,9 +1026,16 @@ export interface SimPolicy extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; + /** + * A dictionary of sites to the provisioning state of this SIM policy on that site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; /** Aggregate maximum bit rate across all non-GBR QoS flows of all PDU sessions of a given UE. See 3GPP TS23.501 section 5.7.2.6 for a full description of the UE-AMBR. */ ueAmbr: Ambr; - /** The default slice to use if the UE does not explicitly specify it. This slice must exist in the `sliceConfigurations` map. */ + /** The default slice to use if the UE does not explicitly specify it. This slice must exist in the `sliceConfigurations` map. The slice must be in the same location as the SIM policy. */ 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; @@ -772,7 +1045,21 @@ export interface SimPolicy extends TrackedResource { sliceConfigurations: SliceConfiguration[]; } -/** Network slice resource. */ +/** Site resource. Must be created in the same location as its parent mobile network. */ +export interface Site extends TrackedResource { + /** + * The provisioning state of the site resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * An array of IDs of the network functions deployed in the site. Deleting the site will delete any network functions that are deployed in the site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkFunctions?: SubResource[]; +} + +/** Network slice resource. Must be created in the same location as its parent mobile network. */ export interface Slice extends TrackedResource { /** * The provisioning state of the network slice resource. @@ -785,6 +1072,17 @@ export interface Slice extends TrackedResource { description?: string; } +/** Packet core control plane version resource. */ +export interface PacketCoreControlPlaneVersion extends ProxyResource { + /** + * The provisioning state of the packet core control plane version resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Platform specific packet core control plane version properties. */ + platforms?: Platform[]; +} + /** SIM resource. */ export interface Sim extends ProxyResource { /** @@ -797,33 +1095,37 @@ export interface Sim extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly simState?: SimState; + /** + * A dictionary of sites to the provisioning state of this SIM on that site. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly siteProvisioningState?: { + [propertyName: string]: SiteProvisioningState; + }; /** The international mobile subscriber identity (IMSI) for the SIM. */ internationalMobileSubscriberIdentity: string; /** The integrated circuit card ID (ICCID) for the SIM. */ integratedCircuitCardIdentifier?: string; - /** The Ki value for the SIM. */ - authenticationKey?: string; - /** The Opc value for the SIM. */ - operatorKeyCode?: string; /** An optional free-form text field that can be used to record the device type this SIM is associated with, for example 'Video camera'. The Azure portal allows SIMs to be grouped and filtered based on this value. */ deviceType?: string; - /** The SIM policy used by this SIM. */ + /** The SIM policy used by this SIM. The SIM policy must be in the same location as the SIM. */ simPolicy?: SimPolicyResourceId; /** A list of static IP addresses assigned to this SIM. Each address is assigned at a defined network scope, made up of {attached data network, slice}. */ staticIpConfiguration?: SimStaticIpProperties[]; -} - -/** Packet core control plane version resource. */ -export interface PacketCoreControlPlaneVersion extends ProxyResource { /** - * The provisioning state of the packet core control plane version resource. + * The name of the SIM vendor who provided this SIM, if any. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningState; - /** The state of this packet core control plane version. */ - versionState?: VersionState; - /** Indicates whether this is the recommended version to use for new packet core control plane deployments. */ - recommendedVersion?: RecommendedVersion; + readonly vendorName?: string; + /** + * The public key fingerprint of the SIM vendor who provided this SIM, if any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vendorKeyFingerprint?: string; + /** The Ki value for the SIM. */ + authenticationKey?: string; + /** The Opc value for the SIM. */ + operatorKeyCode?: string; } /** Known values of {@link ProvisioningState} that the service accepts. */ @@ -901,119 +1203,158 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; -/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ -export enum KnownManagedServiceIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" +/** Known values of {@link InstallationState} that the service accepts. */ +export enum KnownInstallationState { + /** The packet core is uninstalled. */ + Uninstalled = "Uninstalled", + /** The packet core is installing. */ + Installing = "Installing", + /** The packet core is installed. */ + Installed = "Installed", + /** The packet core is updating its configuration. */ + Updating = "Updating", + /** The packet core is upgrading to a different software version. */ + Upgrading = "Upgrading", + /** The packet core is uninstalling. */ + Uninstalling = "Uninstalling", + /** The packet core is reinstalling. */ + Reinstalling = "Reinstalling", + /** The packet core is rolling back to its previous version. */ + RollingBack = "RollingBack", + /** The packet core is in failed state. */ + Failed = "Failed" } /** - * Defines values for ManagedServiceIdentityType. \ - * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * Defines values for InstallationState. \ + * {@link KnownInstallationState} can be used interchangeably with InstallationState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **None** \ - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned,UserAssigned** + * **Uninstalled**: The packet core is uninstalled. \ + * **Installing**: The packet core is installing. \ + * **Installed**: The packet core is installed. \ + * **Updating**: The packet core is updating its configuration. \ + * **Upgrading**: The packet core is upgrading to a different software version. \ + * **Uninstalling**: The packet core is uninstalling. \ + * **Reinstalling**: The packet core is reinstalling. \ + * **RollingBack**: The packet core is rolling back to its previous version. \ + * **Failed**: The packet core is in failed state. */ -export type ManagedServiceIdentityType = string; +export type InstallationState = string; -/** Known values of {@link SimState} that the service accepts. */ -export enum KnownSimState { - /** The SIM is disabled because not all configuration required for enabling is present. */ - Disabled = "Disabled", - /** The SIM is enabled. */ - Enabled = "Enabled", - /** The SIM cannot be enabled because some of the associated configuration is invalid. */ - Invalid = "Invalid" +/** 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. */ + AKSHCI = "AKS-HCI", + /** If this option is chosen, you must set one of "azureStackHciCluster", "connectedCluster" or "customLocation". If multiple are set, they must be consistent with each other. */ + ThreePAzureStackHCI = "3P-AZURE-STACK-HCI" } /** - * Defines values for SimState. \ - * {@link KnownSimState} can be used interchangeably with SimState, + * Defines values for PlatformType. \ + * {@link KnownPlatformType} can be used interchangeably with PlatformType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AKS-HCI**: 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. \ + * **3P-AZURE-STACK-HCI**: If this option is chosen, you must set one of "azureStackHciCluster", "connectedCluster" or "customLocation". If multiple are set, they must be consistent with each other. + */ +export type PlatformType = string; + +/** Known values of {@link BillingSku} that the service accepts. */ +export enum KnownBillingSku { + /** 100 Mbps, 20 active SIMs plan */ + G0 = "G0", + /** 1 Gbps, 100 active SIMs plan */ + G1 = "G1", + /** 2 Gbps, 200 active SIMs plan */ + 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 */ + G10 = "G10" +} + +/** + * Defines values for BillingSku. \ + * {@link KnownBillingSku} can be used interchangeably with BillingSku, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Disabled**: The SIM is disabled because not all configuration required for enabling is present. \ - * **Enabled**: The SIM is enabled. \ - * **Invalid**: The SIM cannot be enabled because some of the associated configuration is invalid. + * **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 \ + * **G5**: 5 Gbps, 500 active SIMs plan \ + * **G10**: 10 Gbps, 1000 active SIMs plan */ -export type SimState = string; +export type BillingSku = 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 then "customLocation" will take precedence over "connectedCluster" which takes precedence over "azureStackEdgeDevice". */ - AKSHCI = "AKS-HCI", - /** If this option is chosen, you must set one of "connectedCluster" or "customLocation". If multiple are set then "customLocation" will take precedence over "connectedCluster". */ - BaseVM = "BaseVM" +/** Known values of {@link AuthenticationType} that the service accepts. */ +export enum KnownAuthenticationType { + /** Use AAD SSO to authenticate the user (this requires internet access). */ + AAD = "AAD", + /** Use locally stored passwords to authenticate the user. */ + Password = "Password" } /** - * Defines values for PlatformType. \ - * {@link KnownPlatformType} can be used interchangeably with PlatformType, + * Defines values for AuthenticationType. \ + * {@link KnownAuthenticationType} can be used interchangeably with AuthenticationType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **AKS-HCI**: If this option is chosen, you must set one of "azureStackEdgeDevice", "connectedCluster" or "customLocation". If multiple are set then "customLocation" will take precedence over "connectedCluster" which takes precedence over "azureStackEdgeDevice". \ - * **BaseVM**: If this option is chosen, you must set one of "connectedCluster" or "customLocation". If multiple are set then "customLocation" will take precedence over "connectedCluster". + * **AAD**: Use AAD SSO to authenticate the user (this requires internet access). \ + * **Password**: Use locally stored passwords to authenticate the user. */ -export type PlatformType = string; +export type AuthenticationType = string; -/** Known values of {@link CoreNetworkType} that the service accepts. */ -export enum KnownCoreNetworkType { - /** 5G core */ - FiveGC = "5GC", - /** EPC / 4G core */ - EPC = "EPC" +/** Known values of {@link CertificateProvisioningState} that the service accepts. */ +export enum KnownCertificateProvisioningState { + /** The certificate has not been provisioned. */ + NotProvisioned = "NotProvisioned", + /** The certificate has been provisioned. */ + Provisioned = "Provisioned", + /** The certificate failed to be provisioned. The "reason" property explains why. */ + Failed = "Failed" } /** - * Defines values for CoreNetworkType. \ - * {@link KnownCoreNetworkType} can be used interchangeably with CoreNetworkType, + * Defines values for CertificateProvisioningState. \ + * {@link KnownCertificateProvisioningState} can be used interchangeably with CertificateProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **5GC**: 5G core \ - * **EPC**: EPC \/ 4G core + * **NotProvisioned**: The certificate has not been provisioned. \ + * **Provisioned**: The certificate has been provisioned. \ + * **Failed**: The certificate failed to be provisioned. The "reason" property explains why. */ -export type CoreNetworkType = string; +export type CertificateProvisioningState = string; -/** Known values of {@link BillingSku} that the service accepts. */ -export enum KnownBillingSku { - /** Evaluation package plan */ - EvaluationPackage = "EvaluationPackage", - /** Flagship starter package plan */ - FlagshipStarterPackage = "FlagshipStarterPackage", - /** Edge site 2Gbps plan */ - EdgeSite2Gbps = "EdgeSite2GBPS", - /** Edge site 3Gbps plan */ - EdgeSite3Gbps = "EdgeSite3GBPS", - /** Edge site 4Gbps plan */ - EdgeSite4Gbps = "EdgeSite4GBPS", - /** Medium package plan */ - MediumPackage = "MediumPackage", - /** Large package plan */ - LargePackage = "LargePackage" +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" } /** - * Defines values for BillingSku. \ - * {@link KnownBillingSku} can be used interchangeably with BillingSku, + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **EvaluationPackage**: Evaluation package plan \ - * **FlagshipStarterPackage**: Flagship starter package plan \ - * **EdgeSite2GBPS**: Edge site 2Gbps plan \ - * **EdgeSite3GBPS**: Edge site 3Gbps plan \ - * **EdgeSite4GBPS**: Edge site 4Gbps plan \ - * **MediumPackage**: Medium package plan \ - * **LargePackage**: Large package plan + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** */ -export type BillingSku = string; +export type ManagedServiceIdentityType = string; /** Known values of {@link VersionState} that the service accepts. */ export enum KnownVersionState { @@ -1063,6 +1404,24 @@ export enum KnownRecommendedVersion { */ export type RecommendedVersion = string; +/** Known values of {@link ObsoleteVersion} that the service accepts. */ +export enum KnownObsoleteVersion { + /** This version is obsolete for use in new packet core control plane deployments. */ + Obsolete = "Obsolete", + /** This version is not obsolete for use in new packet core control plane deployments. */ + NotObsolete = "NotObsolete" +} + +/** + * Defines values for ObsoleteVersion. \ + * {@link KnownObsoleteVersion} can be used interchangeably with ObsoleteVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Obsolete**: This version is obsolete for use in new packet core control plane deployments. \ + * **NotObsolete**: This version is not obsolete for use in new packet core control plane deployments. + */ +export type ObsoleteVersion = string; + /** Known values of {@link PreemptionCapability} that the service accepts. */ export enum KnownPreemptionCapability { /** Cannot preempt */ @@ -1138,6 +1497,57 @@ export enum KnownSdfDirection { */ export type SdfDirection = string; +/** Known values of {@link SimState} that the service accepts. */ +export enum KnownSimState { + /** The SIM is disabled because not all configuration required for enabling is present. */ + Disabled = "Disabled", + /** The SIM is enabled. */ + Enabled = "Enabled", + /** The SIM cannot be enabled because some of the associated configuration is invalid. */ + Invalid = "Invalid" +} + +/** + * Defines values for SimState. \ + * {@link KnownSimState} can be used interchangeably with SimState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled**: The SIM is disabled because not all configuration required for enabling is present. \ + * **Enabled**: The SIM is enabled. \ + * **Invalid**: The SIM cannot be enabled because some of the associated configuration is invalid. + */ +export type SimState = string; + +/** Known values of {@link SiteProvisioningState} that the service accepts. */ +export enum KnownSiteProvisioningState { + /** The resource should not be provisioned on this site. */ + NotApplicable = "NotApplicable", + /** The resource is being added to this site. */ + Adding = "Adding", + /** The resource is being updated on this site. */ + Updating = "Updating", + /** The resource is being deleted from this site. */ + Deleting = "Deleting", + /** The resource is provisioned on this site. */ + Provisioned = "Provisioned", + /** The resource failed to be provisioned on this site. */ + Failed = "Failed" +} + +/** + * Defines values for SiteProvisioningState. \ + * {@link KnownSiteProvisioningState} can be used interchangeably with SiteProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotApplicable**: The resource should not be provisioned on this site. \ + * **Adding**: The resource is being added to this site. \ + * **Updating**: The resource is being updated on this site. \ + * **Deleting**: The resource is being deleted from this site. \ + * **Provisioned**: The resource is provisioned on this site. \ + * **Failed**: The resource failed to be provisioned on this site. + */ +export type SiteProvisioningState = string; + /** Known values of {@link PduSessionType} that the service accepts. */ export enum KnownPduSessionType { /** IPv4 */ @@ -1155,6 +1565,8 @@ export enum KnownPduSessionType { * **IPv6** */ export type PduSessionType = string; +/** Defines values for CoreNetworkType. */ +export type CoreNetworkType = "5GC" | "EPC"; /** Optional parameters. */ export interface AttachedDataNetworksDeleteOptionalParams @@ -1237,210 +1649,26 @@ export type DataNetworksCreateOrUpdateResponse = DataNetwork; export interface DataNetworksUpdateTagsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the updateTags operation. */ -export type DataNetworksUpdateTagsResponse = DataNetwork; - -/** Optional parameters. */ -export interface DataNetworksListByMobileNetworkOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByMobileNetwork operation. */ -export type DataNetworksListByMobileNetworkResponse = DataNetworkListResult; - -/** Optional parameters. */ -export interface DataNetworksListByMobileNetworkNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByMobileNetworkNext operation. */ -export type DataNetworksListByMobileNetworkNextResponse = DataNetworkListResult; - -/** Optional parameters. */ -export interface MobileNetworksDeleteOptionalParams - 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 MobileNetworksGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type MobileNetworksGetResponse = MobileNetwork; - -/** Optional parameters. */ -export interface MobileNetworksCreateOrUpdateOptionalParams - 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 MobileNetworksCreateOrUpdateResponse = MobileNetwork; - -/** Optional parameters. */ -export interface MobileNetworksUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type MobileNetworksUpdateTagsResponse = MobileNetwork; - -/** Optional parameters. */ -export interface MobileNetworksListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type MobileNetworksListBySubscriptionResponse = MobileNetworkListResult; - -/** Optional parameters. */ -export interface MobileNetworksListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type MobileNetworksListByResourceGroupResponse = MobileNetworkListResult; - -/** Optional parameters. */ -export interface MobileNetworksListSimIdsOptionalParams - 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 listSimIds operation. */ -export type MobileNetworksListSimIdsResponse = SimIdListResult; - -/** Optional parameters. */ -export interface MobileNetworksListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type MobileNetworksListBySubscriptionNextResponse = MobileNetworkListResult; - -/** Optional parameters. */ -export interface MobileNetworksListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type MobileNetworksListByResourceGroupNextResponse = MobileNetworkListResult; - -/** Optional parameters. */ -export interface SitesDeleteOptionalParams 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 SitesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SitesGetResponse = Site; - -/** Optional parameters. */ -export interface SitesCreateOrUpdateOptionalParams - 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 SitesCreateOrUpdateResponse = Site; - -/** Optional parameters. */ -export interface SitesUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type SitesUpdateTagsResponse = Site; - -/** Optional parameters. */ -export interface SitesListByMobileNetworkOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByMobileNetwork operation. */ -export type SitesListByMobileNetworkResponse = SiteListResult; - -/** Optional parameters. */ -export interface SitesListByMobileNetworkNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByMobileNetworkNext operation. */ -export type SitesListByMobileNetworkNextResponse = SiteListResult; - -/** Optional parameters. */ -export interface SimGroupsDeleteOptionalParams - 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 SimGroupsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SimGroupsGetResponse = SimGroup; - -/** Optional parameters. */ -export interface SimGroupsCreateOrUpdateOptionalParams - 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 SimGroupsCreateOrUpdateResponse = SimGroup; - -/** Optional parameters. */ -export interface SimGroupsUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type SimGroupsUpdateTagsResponse = SimGroup; - -/** Optional parameters. */ -export interface SimGroupsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type SimGroupsListBySubscriptionResponse = SimGroupListResult; - -/** Optional parameters. */ -export interface SimGroupsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type SimGroupsListByResourceGroupResponse = SimGroupListResult; - +/** Contains response data for the updateTags operation. */ +export type DataNetworksUpdateTagsResponse = DataNetwork; + /** Optional parameters. */ -export interface SimGroupsListBySubscriptionNextOptionalParams +export interface DataNetworksListByMobileNetworkOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type SimGroupsListBySubscriptionNextResponse = SimGroupListResult; +/** Contains response data for the listByMobileNetwork operation. */ +export type DataNetworksListByMobileNetworkResponse = DataNetworkListResult; /** Optional parameters. */ -export interface SimGroupsListByResourceGroupNextOptionalParams +export interface DataNetworksListByMobileNetworkNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type SimGroupsListByResourceGroupNextResponse = SimGroupListResult; +/** Contains response data for the listByMobileNetworkNext operation. */ +export type DataNetworksListByMobileNetworkNextResponse = DataNetworkListResult; /** Optional parameters. */ -export interface SimsDeleteOptionalParams extends coreClient.OperationOptions { +export interface MobileNetworksDeleteOptionalParams + 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. */ @@ -1448,13 +1676,14 @@ export interface SimsDeleteOptionalParams extends coreClient.OperationOptions { } /** Optional parameters. */ -export interface SimsGetOptionalParams extends coreClient.OperationOptions {} +export interface MobileNetworksGetOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SimsGetResponse = Sim; +export type MobileNetworksGetResponse = MobileNetwork; /** Optional parameters. */ -export interface SimsCreateOrUpdateOptionalParams +export interface MobileNetworksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1463,21 +1692,42 @@ export interface SimsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type SimsCreateOrUpdateResponse = Sim; +export type MobileNetworksCreateOrUpdateResponse = MobileNetwork; + +/** Optional parameters. */ +export interface MobileNetworksUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type MobileNetworksUpdateTagsResponse = MobileNetwork; + +/** Optional parameters. */ +export interface MobileNetworksListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type MobileNetworksListBySubscriptionResponse = MobileNetworkListResult; + +/** Optional parameters. */ +export interface MobileNetworksListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type MobileNetworksListByResourceGroupResponse = MobileNetworkListResult; /** Optional parameters. */ -export interface SimsListBySimGroupOptionalParams +export interface MobileNetworksListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySimGroup operation. */ -export type SimsListBySimGroupResponse = SimListResult; +/** Contains response data for the listBySubscriptionNext operation. */ +export type MobileNetworksListBySubscriptionNextResponse = MobileNetworkListResult; /** Optional parameters. */ -export interface SimsListBySimGroupNextOptionalParams +export interface MobileNetworksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySimGroupNext operation. */ -export type SimsListBySimGroupNextResponse = SimListResult; +/** Contains response data for the listByResourceGroupNext operation. */ +export type MobileNetworksListByResourceGroupNextResponse = MobileNetworkListResult; /** Optional parameters. */ export interface OperationsListOptionalParams @@ -1556,6 +1806,42 @@ export interface PacketCoreControlPlanesListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type PacketCoreControlPlanesListByResourceGroupNextResponse = PacketCoreControlPlaneListResult; +/** Optional parameters. */ +export interface PacketCoreControlPlaneRollbackOptionalParams + 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 rollback operation. */ +export type PacketCoreControlPlaneRollbackResponse = AsyncOperationStatus; + +/** Optional parameters. */ +export interface PacketCoreControlPlaneReinstallOptionalParams + 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 reinstall operation. */ +export type PacketCoreControlPlaneReinstallResponse = AsyncOperationStatus; + +/** Optional parameters. */ +export interface PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams + 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 collectDiagnosticsPackage operation. */ +export type PacketCoreControlPlaneCollectDiagnosticsPackageResponse = AsyncOperationStatus; + /** Optional parameters. */ export interface PacketCoreControlPlaneVersionsGetOptionalParams extends coreClient.OperationOptions {} @@ -1564,18 +1850,18 @@ export interface PacketCoreControlPlaneVersionsGetOptionalParams export type PacketCoreControlPlaneVersionsGetResponse = PacketCoreControlPlaneVersion; /** Optional parameters. */ -export interface PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams +export interface PacketCoreControlPlaneVersionsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type PacketCoreControlPlaneVersionsListByResourceGroupResponse = PacketCoreControlPlaneVersionListResult; +/** Contains response data for the list operation. */ +export type PacketCoreControlPlaneVersionsListResponse = PacketCoreControlPlaneVersionListResult; /** Optional parameters. */ -export interface PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams +export interface PacketCoreControlPlaneVersionsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type PacketCoreControlPlaneVersionsListByResourceGroupNextResponse = PacketCoreControlPlaneVersionListResult; +/** Contains response data for the listNext operation. */ +export type PacketCoreControlPlaneVersionsListNextResponse = PacketCoreControlPlaneVersionListResult; /** Optional parameters. */ export interface PacketCoreDataPlanesDeleteOptionalParams @@ -1675,6 +1961,145 @@ export interface ServicesListByMobileNetworkNextOptionalParams /** Contains response data for the listByMobileNetworkNext operation. */ export type ServicesListByMobileNetworkNextResponse = ServiceListResult; +/** Optional parameters. */ +export interface SimsDeleteOptionalParams 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 SimsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SimsGetResponse = Sim; + +/** Optional parameters. */ +export interface SimsCreateOrUpdateOptionalParams + 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 SimsCreateOrUpdateResponse = Sim; + +/** Optional parameters. */ +export interface SimsListByGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByGroup operation. */ +export type SimsListByGroupResponse = SimListResult; + +/** Optional parameters. */ +export interface SimsListByGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByGroupNext operation. */ +export type SimsListByGroupNextResponse = SimListResult; + +/** Optional parameters. */ +export interface SimBulkUploadOptionalParams + 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 bulkUpload operation. */ +export type SimBulkUploadResponse = AsyncOperationStatus; + +/** Optional parameters. */ +export interface SimBulkDeleteOptionalParams + 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 bulkDelete operation. */ +export type SimBulkDeleteResponse = AsyncOperationStatus; + +/** Optional parameters. */ +export interface SimBulkUploadEncryptedOptionalParams + 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 bulkUploadEncrypted operation. */ +export type SimBulkUploadEncryptedResponse = AsyncOperationStatus; + +/** Optional parameters. */ +export interface SimGroupsDeleteOptionalParams + 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 SimGroupsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SimGroupsGetResponse = SimGroup; + +/** Optional parameters. */ +export interface SimGroupsCreateOrUpdateOptionalParams + 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 SimGroupsCreateOrUpdateResponse = SimGroup; + +/** Optional parameters. */ +export interface SimGroupsUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type SimGroupsUpdateTagsResponse = SimGroup; + +/** Optional parameters. */ +export interface SimGroupsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type SimGroupsListBySubscriptionResponse = SimGroupListResult; + +/** Optional parameters. */ +export interface SimGroupsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type SimGroupsListByResourceGroupResponse = SimGroupListResult; + +/** Optional parameters. */ +export interface SimGroupsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type SimGroupsListBySubscriptionNextResponse = SimGroupListResult; + +/** Optional parameters. */ +export interface SimGroupsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type SimGroupsListByResourceGroupNextResponse = SimGroupListResult; + /** Optional parameters. */ export interface SimPoliciesDeleteOptionalParams extends coreClient.OperationOptions { @@ -1724,6 +2149,53 @@ export interface SimPoliciesListByMobileNetworkNextOptionalParams /** Contains response data for the listByMobileNetworkNext operation. */ export type SimPoliciesListByMobileNetworkNextResponse = SimPolicyListResult; +/** Optional parameters. */ +export interface SitesDeleteOptionalParams 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 SitesGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SitesGetResponse = Site; + +/** Optional parameters. */ +export interface SitesCreateOrUpdateOptionalParams + 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 SitesCreateOrUpdateResponse = Site; + +/** Optional parameters. */ +export interface SitesUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type SitesUpdateTagsResponse = Site; + +/** Optional parameters. */ +export interface SitesListByMobileNetworkOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByMobileNetwork operation. */ +export type SitesListByMobileNetworkResponse = SiteListResult; + +/** Optional parameters. */ +export interface SitesListByMobileNetworkNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByMobileNetworkNext operation. */ +export type SitesListByMobileNetworkNextResponse = SiteListResult; + /** Optional parameters. */ export interface SlicesDeleteOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts index 2376b0ffd3f8..22e6894f2fc8 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts @@ -510,19 +510,20 @@ export const MobileNetworkListResult: coreClient.CompositeMapper = { } }; -export const SimIdListResult: coreClient.CompositeMapper = { +export const OperationList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SimIdListResult", + className: "OperationList", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SubResource" + className: "Operation" } } } @@ -538,42 +539,60 @@ export const SimIdListResult: coreClient.CompositeMapper = { } }; -export const SubResource: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SubResource", + className: "Operation", modelProperties: { - id: { - serializedName: "id", - required: true, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } } } } }; -export const SiteListResult: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SiteListResult", + className: "OperationDisplay", modelProperties: { - value: { - serializedName: "value", + provider: { + serializedName: "provider", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Site" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", type: { name: "String" } @@ -582,30 +601,37 @@ export const SiteListResult: coreClient.CompositeMapper = { } }; -export const KeyVaultKey: coreClient.CompositeMapper = { +export const Installation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyVaultKey", + className: "Installation", modelProperties: { - keyUrl: { - serializedName: "keyUrl", + state: { + serializedName: "state", type: { name: "String" } + }, + operation: { + serializedName: "operation", + type: { + name: "Composite", + className: "AsyncOperationId" + } } } } }; -export const MobileNetworkResourceId: coreClient.CompositeMapper = { +export const AsyncOperationId: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MobileNetworkResourceId", + className: "AsyncOperationId", 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]\\/[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+$" + "^\\/[pP][rR][oO][vV][iI][dD][eE][rR][sS]\\/[^/?#]+\\/[lL][oO][cC][aA][tT][iI][oO][nN][sS]\\/[^/?#]+\\/[oO][pP][eE][rR][aA][tT][iI][oO][nN][sS][tT][aA][tT][uU][sS][eE][sS]\\/[^/?#]+$" ) }, serializedName: "id", @@ -618,105 +644,93 @@ export const MobileNetworkResourceId: coreClient.CompositeMapper = { } }; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { +export const SiteResourceId: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServiceIdentity", + className: "SiteResourceId", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "Uuid" - } - }, - type: { - serializedName: "type", + 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]\\/[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+\\/[sS][iI][tT][eE][sS]\\/[^/?#]+$" + ) + }, + serializedName: "id", required: true, type: { name: "String" } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" } - } - } } } } }; -export const UserAssignedIdentity: coreClient.CompositeMapper = { +export const PlatformConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UserAssignedIdentity", + className: "PlatformConfiguration", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, + type: { + serializedName: "type", + required: true, type: { - name: "Uuid" + name: "String" } }, - clientId: { - serializedName: "clientId", - readOnly: true, + azureStackEdgeDevice: { + serializedName: "azureStackEdgeDevice", type: { - name: "Uuid" + name: "Composite", + className: "AzureStackEdgeDeviceResourceId" } - } - } - } -}; - -export const SimGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SimGroupListResult", - modelProperties: { - value: { - serializedName: "value", + }, + azureStackEdgeDevices: { + serializedName: "azureStackEdgeDevices", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SimGroup" + className: "AzureStackEdgeDeviceResourceId" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + azureStackHciCluster: { + serializedName: "azureStackHciCluster", type: { - name: "String" + name: "Composite", + className: "AzureStackHCIClusterResourceId" + } + }, + connectedCluster: { + serializedName: "connectedCluster", + type: { + name: "Composite", + className: "ConnectedClusterResourceId" + } + }, + customLocation: { + serializedName: "customLocation", + type: { + name: "Composite", + className: "CustomLocationResourceId" } } } } }; -export const SimPolicyResourceId: coreClient.CompositeMapper = { +export const AzureStackEdgeDeviceResourceId: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SimPolicyResourceId", + className: "AzureStackEdgeDeviceResourceId", 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]\\/[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+\\/[sS][iI][mM][pP][oO][lL][iI][cC][iI][eE][sS]\\/[^/?#]+$" + "^\\/[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]\\.[dD][aA][tT][aA][bB][oO][xX][eE][dD][gG][eE]\\/[dD][aA][tT][aA][bB][oO][xX][eE][dD][gG][eE][dD][eE][vV][iI][cC][eE][sS]\\/[^/?#]+$" ) }, serializedName: "id", @@ -729,45 +743,36 @@ export const SimPolicyResourceId: coreClient.CompositeMapper = { } }; -export const SimStaticIpProperties: coreClient.CompositeMapper = { +export const AzureStackHCIClusterResourceId: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SimStaticIpProperties", + className: "AzureStackHCIClusterResourceId", modelProperties: { - attachedDataNetwork: { - serializedName: "attachedDataNetwork", - type: { - name: "Composite", - className: "AttachedDataNetworkResourceId" - } - }, - slice: { - serializedName: "slice", - type: { - name: "Composite", - className: "SliceResourceId" - } - }, - staticIp: { - serializedName: "staticIp", + 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]\\.[aA][zZ][uU][rR][eE][sS][tT][aA][cC][kK][hH][cC][iI]\\/[cC][lL][uU][sS][tT][eE][rR][sS]\\/[^/?#]+$" + ) + }, + serializedName: "id", + required: true, type: { - name: "Composite", - className: "SimStaticIpPropertiesStaticIp" + name: "String" } } } } }; -export const AttachedDataNetworkResourceId: coreClient.CompositeMapper = { +export const ConnectedClusterResourceId: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AttachedDataNetworkResourceId", + className: "ConnectedClusterResourceId", 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]\\/[^/?#]+\\/[pP][aA][cC][kK][eE][tT][cC][oO][rR][eE][dD][aA][tT][aA][pP][lL][aA][nN][eE][sS]\\/[^/?#]+\\/[aA][tT][tT][aA][cC][hH][eE][dD][dD][aA][tT][aA][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+$" + "^\\/[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]\\.[kK][uU][bB][eE][rR][nN][eE][tT][eE][sS]\\/[cC][oO][nN][nN][eE][cC][tT][eE][dD][cC][lL][uU][sS][tT][eE][rR][sS]\\/[^/?#]+$" ) }, serializedName: "id", @@ -780,15 +785,15 @@ export const AttachedDataNetworkResourceId: coreClient.CompositeMapper = { } }; -export const SliceResourceId: coreClient.CompositeMapper = { +export const CustomLocationResourceId: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SliceResourceId", + className: "CustomLocationResourceId", 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]\\/[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+\\/[sS][lL][iI][cC][eE][sS]\\/[^/?#]+$" + "^\\/[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]\\.[eE][xX][tT][eE][nN][dD][eE][dD][lL][oO][cC][aA][tT][iI][oO][nN]\\/[cC][uU][sS][tT][oO][mM][lL][oO][cC][aA][tT][iI][oO][nN][sS]\\/[^/?#]+$" ) }, serializedName: "id", @@ -801,74 +806,66 @@ export const SliceResourceId: coreClient.CompositeMapper = { } }; -export const SimStaticIpPropertiesStaticIp: coreClient.CompositeMapper = { +export const LocalDiagnosticsAccessConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SimStaticIpPropertiesStaticIp", + className: "LocalDiagnosticsAccessConfiguration", modelProperties: { - ipv4Address: { - constraints: { - Pattern: new RegExp( - "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" - ) - }, - serializedName: "ipv4Address", + authenticationType: { + serializedName: "authenticationType", + required: true, type: { name: "String" } + }, + httpsServerCertificate: { + serializedName: "httpsServerCertificate", + type: { + name: "Composite", + className: "HttpsServerCertificate" + } } } } }; -export const SimListResult: coreClient.CompositeMapper = { +export const HttpsServerCertificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SimListResult", + className: "HttpsServerCertificate", modelProperties: { - value: { - serializedName: "value", + certificateUrl: { + serializedName: "certificateUrl", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Sim" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + provisioning: { + serializedName: "provisioning", type: { - name: "String" + name: "Composite", + className: "CertificateProvisioning" } } } } }; -export const OperationList: coreClient.CompositeMapper = { +export const CertificateProvisioning: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationList", + className: "CertificateProvisioning", modelProperties: { - value: { - serializedName: "value", + state: { + serializedName: "state", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + reason: { + serializedName: "reason", readOnly: true, type: { name: "String" @@ -878,60 +875,88 @@ export const OperationList: coreClient.CompositeMapper = { } }; -export const Operation: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "ManagedServiceIdentity", modelProperties: { - isDataAction: { - serializedName: "isDataAction", + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "Boolean" + name: "Uuid" } }, - name: { - serializedName: "name", + tenantId: { + serializedName: "tenantId", readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + required: true, type: { name: "String" } }, - display: { - serializedName: "display", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "Composite", - className: "OperationDisplay" + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const UserAssignedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "UserAssignedIdentity", modelProperties: { - provider: { - serializedName: "provider", + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - resource: { - serializedName: "resource", + clientId: { + serializedName: "clientId", + readOnly: true, type: { - name: "String" + name: "Uuid" } - }, - operation: { - serializedName: "operation", + } + } + } +}; + +export const PacketCoreControlPlaneListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PacketCoreControlPlaneListResult", + modelProperties: { + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PacketCoreControlPlane" + } + } } }, - description: { - serializedName: "description", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -940,76 +965,83 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const PlatformConfiguration: coreClient.CompositeMapper = { +export const AsyncOperationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PlatformConfiguration", + className: "AsyncOperationStatus", modelProperties: { - type: { - serializedName: "type", + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", required: true, type: { name: "String" } }, - azureStackEdgeDevice: { - serializedName: "azureStackEdgeDevice", + resourceId: { + serializedName: "resourceId", type: { - name: "Composite", - className: "AzureStackEdgeDeviceResourceId" + name: "String" } }, - connectedCluster: { - serializedName: "connectedCluster", + startTime: { + serializedName: "startTime", type: { - name: "Composite", - className: "ConnectedClusterResourceId" + name: "DateTime" } }, - customLocation: { - serializedName: "customLocation", + endTime: { + serializedName: "endTime", type: { - name: "Composite", - className: "CustomLocationResourceId" + name: "DateTime" } - } - } - } -}; - -export const AzureStackEdgeDeviceResourceId: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureStackEdgeDeviceResourceId", - modelProperties: { - id: { + }, + percentComplete: { 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]\\.[dD][aA][tT][aA][bB][oO][xX][eE][dD][gG][eE]\\/[dD][aA][tT][aA][bB][oO][xX][eE][dD][gG][eE][dD][eE][vV][iI][cC][eE][sS]\\/[^/?#]+$" - ) + InclusiveMaximum: 100, + InclusiveMinimum: 0 }, - serializedName: "id", - required: true, + serializedName: "percentComplete", type: { - name: "String" + name: "Number" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" } } } } }; -export const ConnectedClusterResourceId: coreClient.CompositeMapper = { +export const PacketCoreControlPlaneCollectDiagnosticsPackage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedClusterResourceId", + className: "PacketCoreControlPlaneCollectDiagnosticsPackage", 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]\\.[kK][uU][bB][eE][rR][nN][eE][tT][eE][sS]\\/[cC][oO][nN][nN][eE][cC][tT][eE][dD][cC][lL][uU][sS][tT][eE][rR][sS]\\/[^/?#]+$" - ) - }, - serializedName: "id", + storageAccountBlobUrl: { + serializedName: "storageAccountBlobUrl", required: true, type: { name: "String" @@ -1019,78 +1051,43 @@ export const ConnectedClusterResourceId: coreClient.CompositeMapper = { } }; -export const CustomLocationResourceId: coreClient.CompositeMapper = { +export const Platform: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomLocationResourceId", + className: "Platform", 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]\\.[eE][xX][tT][eE][nN][dD][eE][dD][lL][oO][cC][aA][tT][iI][oO][nN]\\/[cC][uU][sS][tT][oO][mM][lL][oO][cC][aA][tT][iI][oO][nN][sS]\\/[^/?#]+$" - ) - }, - serializedName: "id", - required: true, + platformType: { + serializedName: "platformType", type: { name: "String" } - } - } - } -}; - -export const LocalDiagnosticsAccessConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LocalDiagnosticsAccessConfiguration", - modelProperties: { - httpsServerCertificate: { - serializedName: "httpsServerCertificate", + }, + versionState: { + serializedName: "versionState", type: { - name: "Composite", - className: "KeyVaultCertificate" + name: "String" } - } - } - } -}; - -export const KeyVaultCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KeyVaultCertificate", - modelProperties: { - certificateUrl: { - serializedName: "certificateUrl", + }, + minimumPlatformSoftwareVersion: { + serializedName: "minimumPlatformSoftwareVersion", type: { name: "String" } - } - } - } -}; - -export const PacketCoreControlPlaneListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCoreControlPlaneListResult", - modelProperties: { - value: { - serializedName: "value", + }, + maximumPlatformSoftwareVersion: { + serializedName: "maximumPlatformSoftwareVersion", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PacketCoreControlPlane" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + recommendedVersion: { + serializedName: "recommendedVersion", + type: { + name: "String" + } + }, + obsoleteVersion: { + serializedName: "obsoleteVersion", type: { name: "String" } @@ -1264,29 +1261,623 @@ export const PccRuleConfiguration: coreClient.CompositeMapper = { ruleQosPolicy: { serializedName: "ruleQosPolicy", type: { - name: "Composite", - className: "PccRuleQosPolicy" + name: "Composite", + className: "PccRuleQosPolicy" + } + }, + trafficControl: { + serializedName: "trafficControl", + type: { + name: "String" + } + }, + serviceDataFlowTemplates: { + constraints: { + MinItems: 1, + UniqueItems: true + }, + serializedName: "serviceDataFlowTemplates", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceDataFlowTemplate" + } + } + } + } + } + } +}; + +export const ServiceDataFlowTemplate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceDataFlowTemplate", + modelProperties: { + templateName: { + constraints: { + Pattern: new RegExp( + "^(?!(default|requested|service)$)[a-zA-Z0-9][a-zA-Z0-9_-]*$" + ), + MaxLength: 64 + }, + serializedName: "templateName", + required: true, + type: { + name: "String" + } + }, + direction: { + serializedName: "direction", + required: true, + type: { + name: "String" + } + }, + protocol: { + constraints: { + MinItems: 1, + UniqueItems: true + }, + serializedName: "protocol", + required: true, + type: { + name: "Sequence", + element: { + constraints: { + Pattern: new RegExp( + "^(ip|[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + ) + }, + type: { + name: "String" + } + } + } + }, + remoteIpList: { + constraints: { + MinItems: 1, + UniqueItems: true + }, + serializedName: "remoteIpList", + required: true, + type: { + name: "Sequence", + element: { + constraints: { + Pattern: new RegExp( + "^(any|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2])))$" + ) + }, + type: { + name: "String" + } + } + } + }, + ports: { + constraints: { + UniqueItems: true + }, + serializedName: "ports", + type: { + name: "Sequence", + element: { + constraints: { + Pattern: new RegExp( + "^([1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(-([1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$" + ) + }, + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ServiceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Service" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CommonSimPropertiesFormat: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommonSimPropertiesFormat", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + simState: { + serializedName: "simState", + readOnly: true, + type: { + name: "String" + } + }, + siteProvisioningState: { + serializedName: "siteProvisioningState", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + internationalMobileSubscriberIdentity: { + constraints: { + Pattern: new RegExp("^[0-9]{5,15}$") + }, + serializedName: "internationalMobileSubscriberIdentity", + required: true, + type: { + name: "String" + } + }, + integratedCircuitCardIdentifier: { + constraints: { + Pattern: new RegExp("^[0-9]{10,20}$") + }, + serializedName: "integratedCircuitCardIdentifier", + type: { + name: "String" + } + }, + deviceType: { + serializedName: "deviceType", + type: { + name: "String" + } + }, + simPolicy: { + serializedName: "simPolicy", + type: { + name: "Composite", + className: "SimPolicyResourceId" + } + }, + staticIpConfiguration: { + constraints: { + MinItems: 1, + UniqueItems: true + }, + serializedName: "staticIpConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SimStaticIpProperties" + } + } + } + }, + vendorName: { + serializedName: "vendorName", + readOnly: true, + type: { + name: "String" + } + }, + vendorKeyFingerprint: { + serializedName: "vendorKeyFingerprint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SimPolicyResourceId: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimPolicyResourceId", + 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]\\/[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+\\/[sS][iI][mM][pP][oO][lL][iI][cC][iI][eE][sS]\\/[^/?#]+$" + ) + }, + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SimStaticIpProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimStaticIpProperties", + modelProperties: { + attachedDataNetwork: { + serializedName: "attachedDataNetwork", + type: { + name: "Composite", + className: "AttachedDataNetworkResourceId" + } + }, + slice: { + serializedName: "slice", + type: { + name: "Composite", + className: "SliceResourceId" + } + }, + staticIp: { + serializedName: "staticIp", + type: { + name: "Composite", + className: "SimStaticIpPropertiesStaticIp" + } + } + } + } +}; + +export const AttachedDataNetworkResourceId: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AttachedDataNetworkResourceId", + 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]\\/[^/?#]+\\/[pP][aA][cC][kK][eE][tT][cC][oO][rR][eE][dD][aA][tT][aA][pP][lL][aA][nN][eE][sS]\\/[^/?#]+\\/[aA][tT][tT][aA][cC][hH][eE][dD][dD][aA][tT][aA][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+$" + ) + }, + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SliceResourceId: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SliceResourceId", + 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]\\/[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+\\/[sS][lL][iI][cC][eE][sS]\\/[^/?#]+$" + ) + }, + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SimStaticIpPropertiesStaticIp: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimStaticIpPropertiesStaticIp", + modelProperties: { + ipv4Address: { + constraints: { + Pattern: new RegExp( + "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" + ) + }, + serializedName: "ipv4Address", + type: { + name: "String" + } + } + } + } +}; + +export const SimListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Sim" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SimUploadList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimUploadList", + modelProperties: { + sims: { + constraints: { + MinItems: 1 + }, + serializedName: "sims", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SimNameAndProperties" + } + } + } + } + } + } +}; + +export const SimNameAndProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimNameAndProperties", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + simState: { + serializedName: "properties.simState", + readOnly: true, + type: { + name: "String" + } + }, + siteProvisioningState: { + serializedName: "properties.siteProvisioningState", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + internationalMobileSubscriberIdentity: { + constraints: { + Pattern: new RegExp("^[0-9]{5,15}$") + }, + serializedName: "properties.internationalMobileSubscriberIdentity", + required: true, + type: { + name: "String" + } + }, + integratedCircuitCardIdentifier: { + constraints: { + Pattern: new RegExp("^[0-9]{10,20}$") + }, + serializedName: "properties.integratedCircuitCardIdentifier", + type: { + name: "String" + } + }, + deviceType: { + serializedName: "properties.deviceType", + type: { + name: "String" + } + }, + simPolicy: { + serializedName: "properties.simPolicy", + type: { + name: "Composite", + className: "SimPolicyResourceId" + } + }, + staticIpConfiguration: { + constraints: { + MinItems: 1, + UniqueItems: true + }, + serializedName: "properties.staticIpConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SimStaticIpProperties" + } + } + } + }, + vendorName: { + serializedName: "properties.vendorName", + readOnly: true, + type: { + name: "String" + } + }, + vendorKeyFingerprint: { + serializedName: "properties.vendorKeyFingerprint", + readOnly: true, + type: { + name: "String" + } + }, + authenticationKey: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]{32}$") + }, + serializedName: "properties.authenticationKey", + type: { + name: "String" + } + }, + operatorKeyCode: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]{32}$") + }, + serializedName: "properties.operatorKeyCode", + type: { + name: "String" + } + } + } + } +}; + +export const SimDeleteList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimDeleteList", + modelProperties: { + sims: { + constraints: { + MinItems: 1 + }, + serializedName: "sims", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const EncryptedSimUploadList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptedSimUploadList", + modelProperties: { + version: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "version", + required: true, + type: { + name: "Number" + } + }, + azureKeyIdentifier: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "azureKeyIdentifier", + required: true, + type: { + name: "Number" + } + }, + vendorKeyFingerprint: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]+$") + }, + serializedName: "vendorKeyFingerprint", + required: true, + type: { + name: "String" + } + }, + encryptedTransportKey: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]+$") + }, + serializedName: "encryptedTransportKey", + required: true, + type: { + name: "String" } }, - trafficControl: { - serializedName: "trafficControl", + signedTransportKey: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]+$") + }, + serializedName: "signedTransportKey", + required: true, type: { name: "String" } }, - serviceDataFlowTemplates: { + sims: { constraints: { - MinItems: 1, - UniqueItems: true + MinItems: 1 }, - serializedName: "serviceDataFlowTemplates", + serializedName: "sims", required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ServiceDataFlowTemplate" + className: "SimNameAndEncryptedProperties" } } } @@ -1295,100 +1886,155 @@ export const PccRuleConfiguration: coreClient.CompositeMapper = { } }; -export const ServiceDataFlowTemplate: coreClient.CompositeMapper = { +export const SimNameAndEncryptedProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceDataFlowTemplate", + className: "SimNameAndEncryptedProperties", modelProperties: { - templateName: { - constraints: { - Pattern: new RegExp( - "^(?!(default|requested|service)$)[a-zA-Z0-9][a-zA-Z0-9_-]*$" - ), - MaxLength: 64 - }, - serializedName: "templateName", + name: { + serializedName: "name", required: true, type: { name: "String" } }, - direction: { - serializedName: "direction", - required: true, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - protocol: { + simState: { + serializedName: "properties.simState", + readOnly: true, + type: { + name: "String" + } + }, + siteProvisioningState: { + serializedName: "properties.siteProvisioningState", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + internationalMobileSubscriberIdentity: { constraints: { - MinItems: 1, - UniqueItems: true + Pattern: new RegExp("^[0-9]{5,15}$") }, - serializedName: "protocol", + serializedName: "properties.internationalMobileSubscriberIdentity", required: true, type: { - name: "Sequence", - element: { - constraints: { - Pattern: new RegExp( - "^(ip|[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" - ) - }, - type: { - name: "String" - } - } + name: "String" } }, - remoteIpList: { + integratedCircuitCardIdentifier: { + constraints: { + Pattern: new RegExp("^[0-9]{10,20}$") + }, + serializedName: "properties.integratedCircuitCardIdentifier", + type: { + name: "String" + } + }, + deviceType: { + serializedName: "properties.deviceType", + type: { + name: "String" + } + }, + simPolicy: { + serializedName: "properties.simPolicy", + type: { + name: "Composite", + className: "SimPolicyResourceId" + } + }, + staticIpConfiguration: { constraints: { MinItems: 1, UniqueItems: true }, - serializedName: "remoteIpList", - required: true, + serializedName: "properties.staticIpConfiguration", type: { name: "Sequence", element: { - constraints: { - Pattern: new RegExp( - "^(any|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2])))$" - ) - }, type: { - name: "String" + name: "Composite", + className: "SimStaticIpProperties" } } } }, - ports: { + vendorName: { + serializedName: "properties.vendorName", + readOnly: true, + type: { + name: "String" + } + }, + vendorKeyFingerprint: { + serializedName: "properties.vendorKeyFingerprint", + readOnly: true, + type: { + name: "String" + } + }, + encryptedCredentials: { constraints: { - UniqueItems: true + Pattern: new RegExp("^[0-9a-fA-F]+$") }, - serializedName: "ports", + serializedName: "properties.encryptedCredentials", type: { - name: "Sequence", - element: { - constraints: { - Pattern: new RegExp( - "^([1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(-([1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$" - ) - }, - type: { - name: "String" - } - } + name: "String" } } } } }; -export const ServiceListResult: coreClient.CompositeMapper = { +export const KeyVaultKey: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceListResult", + className: "KeyVaultKey", + modelProperties: { + keyUrl: { + serializedName: "keyUrl", + type: { + name: "String" + } + } + } + } +}; + +export const MobileNetworkResourceId: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MobileNetworkResourceId", + 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]\\/[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+$" + ) + }, + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SimGroupListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimGroupListResult", modelProperties: { value: { serializedName: "value", @@ -1397,7 +2043,7 @@ export const ServiceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Service" + className: "SimGroup" } } } @@ -1495,8 +2141,8 @@ export const DataNetworkConfiguration: coreClient.CompositeMapper = { }, fiveQi: { constraints: { - InclusiveMaximum: 127, - InclusiveMinimum: 1 + InclusiveMaximum: 255, + InclusiveMinimum: 0 }, serializedName: "5qi", type: { @@ -1561,6 +2207,16 @@ export const DataNetworkConfiguration: coreClient.CompositeMapper = { } } } + }, + maximumNumberOfBufferedPackets: { + defaultValue: 10, + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "maximumNumberOfBufferedPackets", + type: { + name: "Number" + } } } } @@ -1615,6 +2271,50 @@ export const SimPolicyListResult: coreClient.CompositeMapper = { } }; +export const SubResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SiteListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SiteListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Site" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const Snssai: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1680,7 +2380,7 @@ export const SimGroupResourceId: coreClient.CompositeMapper = { 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]\\/[mM][oO][bB][iI][lL][eE][nN][eE][tT][wW][oO][rR][kK][sS]\\/[^/?#]+\\/[sS][iI][mM][gG][rR][oO][uU][pP][sS]\\/[^/?#]+$" + "^\\/[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]\\/[sS][iI][mM][gG][rR][oO][uU][pP][sS]\\/[^/?#]+$" ) }, serializedName: "id", @@ -1770,8 +2470,55 @@ export const PccRuleQosPolicy: coreClient.CompositeMapper = { guaranteedBitRate: { serializedName: "guaranteedBitRate", type: { - name: "Composite", - className: "Ambr" + name: "Composite", + className: "Ambr" + } + } + } + } +}; + +export const SimPropertiesFormat: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimPropertiesFormat", + modelProperties: { + ...CommonSimPropertiesFormat.type.modelProperties, + authenticationKey: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]{32}$") + }, + serializedName: "authenticationKey", + type: { + name: "String" + } + }, + operatorKeyCode: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]{32}$") + }, + serializedName: "operatorKeyCode", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptedSimPropertiesFormat: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptedSimPropertiesFormat", + modelProperties: { + ...CommonSimPropertiesFormat.type.modelProperties, + encryptedCredentials: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]+$") + }, + serializedName: "encryptedCredentials", + type: { + name: "String" } } } @@ -1803,6 +2550,7 @@ export const AttachedDataNetwork: coreClient.CompositeMapper = { UniqueItems: true }, serializedName: "properties.dnsAddresses", + required: true, type: { name: "Sequence", element: { @@ -1922,39 +2670,10 @@ export const MobileNetwork: coreClient.CompositeMapper = { } }; -export const Site: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Site", - modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - networkFunctions: { - serializedName: "properties.networkFunctions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } - } - } - } - } -}; - -export const SimGroup: coreClient.CompositeMapper = { +export const PacketCoreControlPlane: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SimGroup", + className: "PacketCoreControlPlane", modelProperties: { ...TrackedResource.type.modelProperties, identity: { @@ -1971,49 +2690,28 @@ export const SimGroup: coreClient.CompositeMapper = { name: "String" } }, - encryptionKey: { - serializedName: "properties.encryptionKey", - type: { - name: "Composite", - className: "KeyVaultKey" - } - }, - mobileNetwork: { - serializedName: "properties.mobileNetwork", - type: { - name: "Composite", - className: "MobileNetworkResourceId" - } - } - } - } -}; - -export const PacketCoreControlPlane: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCoreControlPlane", - modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", + installation: { + serializedName: "properties.installation", type: { name: "Composite", - className: "ManagedServiceIdentity" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" + className: "Installation" } }, - mobileNetwork: { - serializedName: "properties.mobileNetwork", + sites: { + constraints: { + MinItems: 1, + UniqueItems: true + }, + serializedName: "properties.sites", + required: true, type: { - name: "Composite", - className: "MobileNetworkResourceId" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SiteResourceId" + } + } } }, platform: { @@ -2024,9 +2722,11 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { } }, coreNetworkTechnology: { + defaultValue: "5GC", serializedName: "properties.coreNetworkTechnology", type: { - name: "String" + name: "Enum", + allowedValues: ["5GC", "EPC"] } }, version: { @@ -2035,6 +2735,13 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { name: "String" } }, + rollbackVersion: { + serializedName: "properties.rollbackVersion", + readOnly: true, + type: { + name: "String" + } + }, controlPlaneAccessInterface: { serializedName: "properties.controlPlaneAccessInterface", type: { @@ -2049,6 +2756,17 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { name: "String" } }, + ueMtu: { + defaultValue: 1440, + constraints: { + InclusiveMaximum: 1930, + InclusiveMinimum: 1280 + }, + serializedName: "properties.ueMtu", + type: { + name: "Number" + } + }, localDiagnosticsAccess: { serializedName: "properties.localDiagnosticsAccess", type: { @@ -2143,6 +2861,44 @@ export const Service: coreClient.CompositeMapper = { } }; +export const SimGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimGroup", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + encryptionKey: { + serializedName: "properties.encryptionKey", + type: { + name: "Composite", + className: "KeyVaultKey" + } + }, + mobileNetwork: { + serializedName: "properties.mobileNetwork", + type: { + name: "Composite", + className: "MobileNetworkResourceId" + } + } + } + } +}; + export const SimPolicy: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2156,6 +2912,14 @@ export const SimPolicy: coreClient.CompositeMapper = { name: "String" } }, + siteProvisioningState: { + serializedName: "properties.siteProvisioningState", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, ueAmbr: { serializedName: "properties.ueAmbr", type: { @@ -2211,6 +2975,36 @@ export const SimPolicy: coreClient.CompositeMapper = { } }; +export const Site: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Site", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + networkFunctions: { + serializedName: "properties.networkFunctions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + } + } + } +}; + export const Slice: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2241,6 +3035,35 @@ export const Slice: coreClient.CompositeMapper = { } }; +export const PacketCoreControlPlaneVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PacketCoreControlPlaneVersion", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + platforms: { + serializedName: "properties.platforms", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Platform" + } + } + } + } + } + } +}; + export const Sim: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2261,6 +3084,14 @@ export const Sim: coreClient.CompositeMapper = { name: "String" } }, + siteProvisioningState: { + serializedName: "properties.siteProvisioningState", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, internationalMobileSubscriberIdentity: { constraints: { Pattern: new RegExp("^[0-9]{5,15}$") @@ -2273,31 +3104,13 @@ export const Sim: coreClient.CompositeMapper = { }, integratedCircuitCardIdentifier: { constraints: { - Pattern: new RegExp("^89[0-9]{17,18}$") + Pattern: new RegExp("^[0-9]{10,20}$") }, serializedName: "properties.integratedCircuitCardIdentifier", type: { name: "String" } }, - authenticationKey: { - constraints: { - Pattern: new RegExp("^[0-9a-fA-F]{32}$") - }, - serializedName: "properties.authenticationKey", - type: { - name: "String" - } - }, - operatorKeyCode: { - constraints: { - Pattern: new RegExp("^[0-9a-fA-F]{32}$") - }, - serializedName: "properties.operatorKeyCode", - type: { - name: "String" - } - }, deviceType: { serializedName: "properties.deviceType", type: { @@ -2326,32 +3139,35 @@ export const Sim: coreClient.CompositeMapper = { } } } - } - } - } -}; - -export const PacketCoreControlPlaneVersion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PacketCoreControlPlaneVersion", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", + }, + vendorName: { + serializedName: "properties.vendorName", readOnly: true, type: { name: "String" } }, - versionState: { - serializedName: "properties.versionState", + vendorKeyFingerprint: { + serializedName: "properties.vendorKeyFingerprint", + readOnly: true, type: { name: "String" } }, - recommendedVersion: { - serializedName: "properties.recommendedVersion", + authenticationKey: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]{32}$") + }, + serializedName: "properties.authenticationKey", + type: { + name: "String" + } + }, + operatorKeyCode: { + constraints: { + Pattern: new RegExp("^[0-9a-fA-F]{32}$") + }, + serializedName: "properties.operatorKeyCode", type: { name: "String" } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts index a51be483e616..6e32f982707d 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts @@ -16,13 +16,17 @@ import { TagsObject as TagsObjectMapper, DataNetwork as DataNetworkMapper, MobileNetwork as MobileNetworkMapper, - Site as SiteMapper, - SimGroup as SimGroupMapper, - Sim as SimMapper, PacketCoreControlPlane as PacketCoreControlPlaneMapper, + PacketCoreControlPlaneCollectDiagnosticsPackage as PacketCoreControlPlaneCollectDiagnosticsPackageMapper, PacketCoreDataPlane as PacketCoreDataPlaneMapper, Service as ServiceMapper, + Sim as SimMapper, + SimUploadList as SimUploadListMapper, + SimDeleteList as SimDeleteListMapper, + EncryptedSimUploadList as EncryptedSimUploadListMapper, + SimGroup as SimGroupMapper, SimPolicy as SimPolicyMapper, + Site as SiteMapper, Slice as SliceMapper } from "../models/mappers"; @@ -129,7 +133,7 @@ export const attachedDataNetworkName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-04-01-preview", + defaultValue: "2022-11-01", isConstant: true, serializedName: "api-version", type: { @@ -214,14 +218,42 @@ export const parameters3: OperationParameter = { mapper: MobileNetworkMapper }; -export const siteName: OperationURLParameter = { - parameterPath: "siteName", +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: PacketCoreControlPlaneMapper +}; + +export const parameters5: OperationParameter = { + parameterPath: "parameters", + mapper: PacketCoreControlPlaneCollectDiagnosticsPackageMapper +}; + +export const versionName: OperationURLParameter = { + parameterPath: "versionName", + mapper: { + serializedName: "versionName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters6: OperationParameter = { + parameterPath: "parameters", + mapper: PacketCoreDataPlaneMapper +}; + +export const serviceName: OperationURLParameter = { + parameterPath: "serviceName", mapper: { constraints: { - Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_-]*$"), + Pattern: new RegExp( + "^(?!(default|requested|service)$)[a-zA-Z0-9][a-zA-Z0-9_-]*$" + ), MaxLength: 64 }, - serializedName: "siteName", + serializedName: "serviceName", required: true, type: { name: "String" @@ -229,9 +261,9 @@ export const siteName: OperationURLParameter = { } }; -export const parameters4: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", - mapper: SiteMapper + mapper: ServiceMapper }; export const simGroupName: OperationURLParameter = { @@ -249,11 +281,6 @@ export const simGroupName: OperationURLParameter = { } }; -export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: SimGroupMapper -}; - export const simName: OperationURLParameter = { parameterPath: "simName", mapper: { @@ -269,42 +296,39 @@ export const simName: OperationURLParameter = { } }; -export const parameters6: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: SimMapper }; -export const parameters7: OperationParameter = { +export const parameters9: OperationParameter = { parameterPath: "parameters", - mapper: PacketCoreControlPlaneMapper + mapper: SimUploadListMapper }; -export const versionName: OperationURLParameter = { - parameterPath: "versionName", - mapper: { - serializedName: "versionName", - required: true, - type: { - name: "String" - } - } +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: SimDeleteListMapper }; -export const parameters8: OperationParameter = { +export const parameters11: OperationParameter = { parameterPath: "parameters", - mapper: PacketCoreDataPlaneMapper + mapper: EncryptedSimUploadListMapper }; -export const serviceName: OperationURLParameter = { - parameterPath: "serviceName", +export const parameters12: OperationParameter = { + parameterPath: "parameters", + mapper: SimGroupMapper +}; + +export const simPolicyName: OperationURLParameter = { + parameterPath: "simPolicyName", mapper: { constraints: { - Pattern: new RegExp( - "^(?!(default|requested|service)$)[a-zA-Z0-9][a-zA-Z0-9_-]*$" - ), + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_-]*$"), MaxLength: 64 }, - serializedName: "serviceName", + serializedName: "simPolicyName", required: true, type: { name: "String" @@ -312,19 +336,19 @@ export const serviceName: OperationURLParameter = { } }; -export const parameters9: OperationParameter = { +export const parameters13: OperationParameter = { parameterPath: "parameters", - mapper: ServiceMapper + mapper: SimPolicyMapper }; -export const simPolicyName: OperationURLParameter = { - parameterPath: "simPolicyName", +export const siteName: OperationURLParameter = { + parameterPath: "siteName", mapper: { constraints: { Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_-]*$"), MaxLength: 64 }, - serializedName: "simPolicyName", + serializedName: "siteName", required: true, type: { name: "String" @@ -332,9 +356,9 @@ export const simPolicyName: OperationURLParameter = { } }; -export const parameters10: OperationParameter = { +export const parameters14: OperationParameter = { parameterPath: "parameters", - mapper: SimPolicyMapper + mapper: SiteMapper }; export const sliceName: OperationURLParameter = { @@ -352,7 +376,7 @@ export const sliceName: OperationURLParameter = { } }; -export const parameters11: OperationParameter = { +export const parameters15: 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 5339a5315992..7a69690531f5 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { AttachedDataNetworks } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,6 +19,7 @@ import { AttachedDataNetwork, AttachedDataNetworksListByPacketCoreDataPlaneNextOptionalParams, AttachedDataNetworksListByPacketCoreDataPlaneOptionalParams, + AttachedDataNetworksListByPacketCoreDataPlaneResponse, AttachedDataNetworksDeleteOptionalParams, AttachedDataNetworksGetOptionalParams, AttachedDataNetworksGetResponse, @@ -26,7 +28,6 @@ import { TagsObject, AttachedDataNetworksUpdateTagsOptionalParams, AttachedDataNetworksUpdateTagsResponse, - AttachedDataNetworksListByPacketCoreDataPlaneResponse, AttachedDataNetworksListByPacketCoreDataPlaneNextResponse } from "../models"; @@ -69,12 +70,16 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByPacketCoreDataPlanePagingPage( resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, - options + options, + settings ); } }; @@ -84,16 +89,23 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { resourceGroupName: string, packetCoreControlPlaneName: string, packetCoreDataPlaneName: string, - options?: AttachedDataNetworksListByPacketCoreDataPlaneOptionalParams + options?: AttachedDataNetworksListByPacketCoreDataPlaneOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByPacketCoreDataPlane( - resourceGroupName, - packetCoreControlPlaneName, - packetCoreDataPlaneName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: AttachedDataNetworksListByPacketCoreDataPlaneResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByPacketCoreDataPlane( + resourceGroupName, + packetCoreControlPlaneName, + packetCoreDataPlaneName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByPacketCoreDataPlaneNext( resourceGroupName, @@ -103,7 +115,9 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -250,7 +264,8 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { } /** - * Creates or updates an attached data network. + * Creates or updates an attached data network. Must be created in the same location as its parent + * packet core data 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 packetCoreDataPlaneName The name of the packet core data plane. @@ -332,7 +347,8 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { } /** - * Creates or updates an attached data network. + * Creates or updates an attached data network. Must be created in the same location as its parent + * packet core data 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 packetCoreDataPlaneName The name of the packet core data plane. @@ -588,7 +604,6 @@ const listByPacketCoreDataPlaneNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts index ccbe624e4f7c..84be12443fc6 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { DataNetworks } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,6 +19,7 @@ import { DataNetwork, DataNetworksListByMobileNetworkNextOptionalParams, DataNetworksListByMobileNetworkOptionalParams, + DataNetworksListByMobileNetworkResponse, DataNetworksDeleteOptionalParams, DataNetworksGetOptionalParams, DataNetworksGetResponse, @@ -26,7 +28,6 @@ import { TagsObject, DataNetworksUpdateTagsOptionalParams, DataNetworksUpdateTagsResponse, - DataNetworksListByMobileNetworkResponse, DataNetworksListByMobileNetworkNextResponse } from "../models"; @@ -66,11 +67,15 @@ export class DataNetworksImpl implements DataNetworks { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByMobileNetworkPagingPage( resourceGroupName, mobileNetworkName, - options + options, + settings ); } }; @@ -79,15 +84,22 @@ export class DataNetworksImpl implements DataNetworks { private async *listByMobileNetworkPagingPage( resourceGroupName: string, mobileNetworkName: string, - options?: DataNetworksListByMobileNetworkOptionalParams + options?: DataNetworksListByMobileNetworkOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByMobileNetwork( - resourceGroupName, - mobileNetworkName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: DataNetworksListByMobileNetworkResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByMobileNetwork( + resourceGroupName, + mobileNetworkName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByMobileNetworkNext( resourceGroupName, @@ -96,7 +108,9 @@ export class DataNetworksImpl implements DataNetworks { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -222,7 +236,8 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Creates or updates a data network. + * Creates or updates a data network. Must be created in the same location as its parent mobile + * network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param dataNetworkName The name of the data network. @@ -301,7 +316,8 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Creates or updates a data network. + * Creates or updates a data network. Must be created in the same location as its parent mobile + * network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param dataNetworkName The name of the data network. @@ -530,7 +546,6 @@ const listByMobileNetworkNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts index 837e063c3d2a..b5fbea4bf05f 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts @@ -9,13 +9,15 @@ export * from "./attachedDataNetworks"; export * from "./dataNetworks"; export * from "./mobileNetworks"; -export * from "./sites"; -export * from "./simGroups"; -export * from "./sims"; export * from "./operations"; export * from "./packetCoreControlPlanes"; +export * from "./packetCoreControlPlaneOperations"; export * from "./packetCoreControlPlaneVersions"; export * from "./packetCoreDataPlanes"; export * from "./services"; +export * from "./sims"; +export * from "./simOperations"; +export * from "./simGroups"; export * from "./simPolicies"; +export * from "./sites"; export * from "./slices"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts index e2741d2d84e5..f366560dd2cf 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { MobileNetworks } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,8 +19,10 @@ import { MobileNetwork, MobileNetworksListBySubscriptionNextOptionalParams, MobileNetworksListBySubscriptionOptionalParams, + MobileNetworksListBySubscriptionResponse, MobileNetworksListByResourceGroupNextOptionalParams, MobileNetworksListByResourceGroupOptionalParams, + MobileNetworksListByResourceGroupResponse, MobileNetworksDeleteOptionalParams, MobileNetworksGetOptionalParams, MobileNetworksGetResponse, @@ -28,10 +31,6 @@ import { TagsObject, MobileNetworksUpdateTagsOptionalParams, MobileNetworksUpdateTagsResponse, - MobileNetworksListBySubscriptionResponse, - MobileNetworksListByResourceGroupResponse, - MobileNetworksListSimIdsOptionalParams, - MobileNetworksListSimIdsResponse, MobileNetworksListBySubscriptionNextResponse, MobileNetworksListByResourceGroupNextResponse } from "../models"; @@ -64,22 +63,34 @@ export class MobileNetworksImpl implements MobileNetworks { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listBySubscriptionPagingPage(options); + 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?: MobileNetworksListBySubscriptionOptionalParams + options?: MobileNetworksListBySubscriptionOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listBySubscription(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: MobileNetworksListBySubscriptionResponse; + 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; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -108,19 +119,33 @@ export class MobileNetworksImpl implements MobileNetworks { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); } }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, - options?: MobileNetworksListByResourceGroupOptionalParams + options?: MobileNetworksListByResourceGroupOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: MobileNetworksListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByResourceGroupNext( resourceGroupName, @@ -128,7 +153,9 @@ export class MobileNetworksImpl implements MobileNetworks { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -384,94 +411,6 @@ export class MobileNetworksImpl implements MobileNetworks { ); } - /** - * Lists the IDs of all provisioned SIMs in a mobile network - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param mobileNetworkName The name of the mobile network. - * @param options The options parameters. - */ - async beginListSimIds( - resourceGroupName: string, - mobileNetworkName: string, - options?: MobileNetworksListSimIdsOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MobileNetworksListSimIdsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, mobileNetworkName, options }, - listSimIdsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Lists the IDs of all provisioned SIMs in a mobile network - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param mobileNetworkName The name of the mobile network. - * @param options The options parameters. - */ - async beginListSimIdsAndWait( - resourceGroupName: string, - mobileNetworkName: string, - options?: MobileNetworksListSimIdsOptionalParams - ): Promise { - const poller = await this.beginListSimIds( - resourceGroupName, - mobileNetworkName, - options - ); - return poller.pollUntilDone(); - } - /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -647,37 +586,6 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listSimIdsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/listSimIds", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SimIdListResult - }, - 201: { - bodyMapper: Mappers.SimIdListResult - }, - 202: { - bodyMapper: Mappers.SimIdListResult - }, - 204: { - bodyMapper: Mappers.SimIdListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.mobileNetworkName - ], - headerParameters: [Parameters.accept], - serializer -}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -689,7 +597,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -709,7 +616,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/operations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/operations.ts index cecaac22056f..7093d1f73eda 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/operations.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/operations.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Operations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -48,22 +49,34 @@ export class OperationsImpl implements Operations { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listPagingPage(options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); } }; } private async *listPagingPage( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -130,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneOperations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneOperations.ts new file mode 100644 index 000000000000..12f6e6853661 --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneOperations.ts @@ -0,0 +1,415 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PacketCoreControlPlaneOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PacketCoreControlPlaneRollbackOptionalParams, + PacketCoreControlPlaneRollbackResponse, + PacketCoreControlPlaneReinstallOptionalParams, + PacketCoreControlPlaneReinstallResponse, + PacketCoreControlPlaneCollectDiagnosticsPackage, + PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams, + PacketCoreControlPlaneCollectDiagnosticsPackageResponse +} from "../models"; + +/** Class containing PacketCoreControlPlaneOperations operations. */ +export class PacketCoreControlPlaneOperationsImpl + implements PacketCoreControlPlaneOperations { + private readonly client: MobileNetworkManagementClient; + + /** + * Initialize a new instance of the class PacketCoreControlPlaneOperations class. + * @param client Reference to the service client + */ + constructor(client: MobileNetworkManagementClient) { + this.client = client; + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". + * Multiple consecutive rollbacks are not possible. This action may cause a service outage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + async beginRollback( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlaneRollbackOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PacketCoreControlPlaneRollbackResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, packetCoreControlPlaneName, options }, + rollbackOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". + * Multiple consecutive rollbacks are not possible. This action may cause a service outage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + async beginRollbackAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlaneRollbackOptionalParams + ): Promise { + const poller = await this.beginRollback( + resourceGroupName, + packetCoreControlPlaneName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state + * from the packet core to return it to a known state. This action will cause a service outage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + async beginReinstall( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlaneReinstallOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PacketCoreControlPlaneReinstallResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, packetCoreControlPlaneName, options }, + reinstallOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state + * from the packet core to return it to a known state. This action will cause a service outage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + async beginReinstallAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlaneReinstallOptionalParams + ): Promise { + const poller = await this.beginReinstall( + resourceGroupName, + packetCoreControlPlaneName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload + * the diagnostics to a storage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package + * operation. + * @param options The options parameters. + */ + async beginCollectDiagnosticsPackage( + resourceGroupName: string, + packetCoreControlPlaneName: string, + parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, + options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PacketCoreControlPlaneCollectDiagnosticsPackageResponse + >, + PacketCoreControlPlaneCollectDiagnosticsPackageResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, packetCoreControlPlaneName, parameters, options }, + collectDiagnosticsPackageOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload + * the diagnostics to a storage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package + * operation. + * @param options The options parameters. + */ + async beginCollectDiagnosticsPackageAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, + options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams + ): Promise { + const poller = await this.beginCollectDiagnosticsPackage( + resourceGroupName, + packetCoreControlPlaneName, + parameters, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const rollbackOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName + ], + headerParameters: [Parameters.accept], + serializer +}; +const reinstallOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName + ], + headerParameters: [Parameters.accept], + serializer +}; +const collectDiagnosticsPackageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.packetCoreControlPlaneName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts index 103c903b89ee..6f66a5b0c05c 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { PacketCoreControlPlaneVersions } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -14,12 +15,12 @@ import * as Parameters from "../models/parameters"; import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; import { PacketCoreControlPlaneVersion, - PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams, - PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams, + PacketCoreControlPlaneVersionsListNextOptionalParams, + PacketCoreControlPlaneVersionsListOptionalParams, + PacketCoreControlPlaneVersionsListResponse, PacketCoreControlPlaneVersionsGetOptionalParams, PacketCoreControlPlaneVersionsGetResponse, - PacketCoreControlPlaneVersionsListByResourceGroupResponse, - PacketCoreControlPlaneVersionsListByResourceGroupNextResponse + PacketCoreControlPlaneVersionsListNextResponse } from "../models"; /// @@ -40,10 +41,10 @@ export class PacketCoreControlPlaneVersionsImpl * Lists all supported packet core control planes versions. * @param options The options parameters. */ - public listByResourceGroup( - options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + public list( + options?: PacketCoreControlPlaneVersionsListOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(options); + const iter = this.listPagingAll(options); return { next() { return iter.next(); @@ -51,29 +52,41 @@ export class PacketCoreControlPlaneVersionsImpl [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listByResourceGroupPagingPage(options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); } }; } - private async *listByResourceGroupPagingPage( - options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + private async *listPagingPage( + options?: PacketCoreControlPlaneVersionsListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByResourceGroup(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: PacketCoreControlPlaneVersionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { - result = await this._listByResourceGroupNext(continuationToken, options); + result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } - private async *listByResourceGroupPagingAll( - options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + private async *listPagingAll( + options?: PacketCoreControlPlaneVersionsListOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage(options)) { + for await (const page of this.listPagingPage(options)) { yield* page; } } @@ -97,27 +110,24 @@ export class PacketCoreControlPlaneVersionsImpl * Lists all supported packet core control planes versions. * @param options The options parameters. */ - private _listByResourceGroup( - options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listByResourceGroupOperationSpec - ); + private _list( + options?: PacketCoreControlPlaneVersionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } /** - * ListByResourceGroupNext - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ - private _listByResourceGroupNext( + private _listNext( nextLink: string, - options?: PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams - ): Promise { + options?: PacketCoreControlPlaneVersionsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listByResourceGroupNextOperationSpec + listNextOperationSpec ); } } @@ -141,7 +151,7 @@ const getOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { path: "/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions", httpMethod: "GET", responses: { @@ -157,7 +167,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -168,7 +178,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, 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 083f16306ae5..6866e542ea17 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { PacketCoreControlPlanes } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,8 +19,10 @@ import { PacketCoreControlPlane, PacketCoreControlPlanesListBySubscriptionNextOptionalParams, PacketCoreControlPlanesListBySubscriptionOptionalParams, + PacketCoreControlPlanesListBySubscriptionResponse, PacketCoreControlPlanesListByResourceGroupNextOptionalParams, PacketCoreControlPlanesListByResourceGroupOptionalParams, + PacketCoreControlPlanesListByResourceGroupResponse, PacketCoreControlPlanesDeleteOptionalParams, PacketCoreControlPlanesGetOptionalParams, PacketCoreControlPlanesGetResponse, @@ -28,8 +31,6 @@ import { TagsObject, PacketCoreControlPlanesUpdateTagsOptionalParams, PacketCoreControlPlanesUpdateTagsResponse, - PacketCoreControlPlanesListBySubscriptionResponse, - PacketCoreControlPlanesListByResourceGroupResponse, PacketCoreControlPlanesListBySubscriptionNextResponse, PacketCoreControlPlanesListByResourceGroupNextResponse } from "../models"; @@ -62,22 +63,34 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listBySubscriptionPagingPage(options); + 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?: PacketCoreControlPlanesListBySubscriptionOptionalParams + options?: PacketCoreControlPlanesListBySubscriptionOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listBySubscription(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: PacketCoreControlPlanesListBySubscriptionResponse; + 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; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -106,19 +119,33 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); } }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, - options?: PacketCoreControlPlanesListByResourceGroupOptionalParams + options?: PacketCoreControlPlanesListByResourceGroupOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: PacketCoreControlPlanesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByResourceGroupNext( resourceGroupName, @@ -126,7 +153,9 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -483,7 +512,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -568,7 +597,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -588,7 +616,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts index e03c0aea4757..d1843e2f83d4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { PacketCoreDataPlanes } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,6 +19,7 @@ import { PacketCoreDataPlane, PacketCoreDataPlanesListByPacketCoreControlPlaneNextOptionalParams, PacketCoreDataPlanesListByPacketCoreControlPlaneOptionalParams, + PacketCoreDataPlanesListByPacketCoreControlPlaneResponse, PacketCoreDataPlanesDeleteOptionalParams, PacketCoreDataPlanesGetOptionalParams, PacketCoreDataPlanesGetResponse, @@ -26,7 +28,6 @@ import { TagsObject, PacketCoreDataPlanesUpdateTagsOptionalParams, PacketCoreDataPlanesUpdateTagsResponse, - PacketCoreDataPlanesListByPacketCoreControlPlaneResponse, PacketCoreDataPlanesListByPacketCoreControlPlaneNextResponse } from "../models"; @@ -66,11 +67,15 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByPacketCoreControlPlanePagingPage( resourceGroupName, packetCoreControlPlaneName, - options + options, + settings ); } }; @@ -79,15 +84,22 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { private async *listByPacketCoreControlPlanePagingPage( resourceGroupName: string, packetCoreControlPlaneName: string, - options?: PacketCoreDataPlanesListByPacketCoreControlPlaneOptionalParams + options?: PacketCoreDataPlanesListByPacketCoreControlPlaneOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByPacketCoreControlPlane( - resourceGroupName, - packetCoreControlPlaneName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: PacketCoreDataPlanesListByPacketCoreControlPlaneResponse; + 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, @@ -96,7 +108,9 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -232,7 +246,8 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { } /** - * Creates or updates a packet core data plane. + * Creates or updates a packet core data plane. Must be created in the same location as its parent + * 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 packetCoreDataPlaneName The name of the packet core data plane. @@ -311,7 +326,8 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { } /** - * Creates or updates a packet core data plane. + * Creates or updates a packet core data plane. Must be created in the same location as its parent + * 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 packetCoreDataPlaneName The name of the packet core data plane. @@ -470,7 +486,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -541,7 +557,6 @@ const listByPacketCoreControlPlaneNextOperationSpec: coreClient.OperationSpec = bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts index 855440de8e20..ee2bf8ecf296 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Services } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,6 +19,7 @@ import { Service, ServicesListByMobileNetworkNextOptionalParams, ServicesListByMobileNetworkOptionalParams, + ServicesListByMobileNetworkResponse, ServicesDeleteOptionalParams, ServicesGetOptionalParams, ServicesGetResponse, @@ -26,7 +28,6 @@ import { TagsObject, ServicesUpdateTagsOptionalParams, ServicesUpdateTagsResponse, - ServicesListByMobileNetworkResponse, ServicesListByMobileNetworkNextResponse } from "../models"; @@ -66,11 +67,15 @@ export class ServicesImpl implements Services { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByMobileNetworkPagingPage( resourceGroupName, mobileNetworkName, - options + options, + settings ); } }; @@ -79,15 +84,22 @@ export class ServicesImpl implements Services { private async *listByMobileNetworkPagingPage( resourceGroupName: string, mobileNetworkName: string, - options?: ServicesListByMobileNetworkOptionalParams + options?: ServicesListByMobileNetworkOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByMobileNetwork( - resourceGroupName, - mobileNetworkName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: ServicesListByMobileNetworkResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByMobileNetwork( + resourceGroupName, + mobileNetworkName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByMobileNetworkNext( resourceGroupName, @@ -96,7 +108,9 @@ export class ServicesImpl implements Services { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -225,7 +239,7 @@ export class ServicesImpl implements Services { } /** - * Creates or updates a service. + * Creates or updates a service. Must be created in the same location as its parent mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param serviceName The name of the service. You must not use any of the following reserved strings - @@ -305,7 +319,7 @@ export class ServicesImpl implements Services { } /** - * Creates or updates a service. + * Creates or updates a service. Must be created in the same location as its parent mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param serviceName The name of the service. You must not use any of the following reserved strings - @@ -465,7 +479,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -536,7 +550,6 @@ const listByMobileNetworkNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts index befb82aa2afa..e7db3f8a40bb 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { SimGroups } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,8 +19,10 @@ import { SimGroup, SimGroupsListBySubscriptionNextOptionalParams, SimGroupsListBySubscriptionOptionalParams, + SimGroupsListBySubscriptionResponse, SimGroupsListByResourceGroupNextOptionalParams, SimGroupsListByResourceGroupOptionalParams, + SimGroupsListByResourceGroupResponse, SimGroupsDeleteOptionalParams, SimGroupsGetOptionalParams, SimGroupsGetResponse, @@ -28,8 +31,6 @@ import { TagsObject, SimGroupsUpdateTagsOptionalParams, SimGroupsUpdateTagsResponse, - SimGroupsListBySubscriptionResponse, - SimGroupsListByResourceGroupResponse, SimGroupsListBySubscriptionNextResponse, SimGroupsListByResourceGroupNextResponse } from "../models"; @@ -62,22 +63,34 @@ export class SimGroupsImpl implements SimGroups { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listBySubscriptionPagingPage(options); + 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?: SimGroupsListBySubscriptionOptionalParams + options?: SimGroupsListBySubscriptionOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listBySubscription(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: SimGroupsListBySubscriptionResponse; + 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; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -106,19 +119,33 @@ export class SimGroupsImpl implements SimGroups { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); } }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, - options?: SimGroupsListByResourceGroupOptionalParams + options?: SimGroupsListByResourceGroupOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: SimGroupsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByResourceGroupNext( resourceGroupName, @@ -126,7 +153,9 @@ export class SimGroupsImpl implements SimGroups { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -483,7 +512,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -568,7 +597,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -588,7 +616,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simOperations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simOperations.ts new file mode 100644 index 000000000000..50f089c8773a --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simOperations.ts @@ -0,0 +1,414 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SimOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { MobileNetworkManagementClient } from "../mobileNetworkManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SimUploadList, + SimBulkUploadOptionalParams, + SimBulkUploadResponse, + SimDeleteList, + SimBulkDeleteOptionalParams, + SimBulkDeleteResponse, + EncryptedSimUploadList, + SimBulkUploadEncryptedOptionalParams, + SimBulkUploadEncryptedResponse +} from "../models"; + +/** Class containing SimOperations operations. */ +export class SimOperationsImpl implements SimOperations { + private readonly client: MobileNetworkManagementClient; + + /** + * Initialize a new instance of the class SimOperations class. + * @param client Reference to the service client + */ + constructor(client: MobileNetworkManagementClient) { + this.client = client; + } + + /** + * Bulk upload SIMs to a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param options The options parameters. + */ + async beginBulkUpload( + resourceGroupName: string, + simGroupName: string, + parameters: SimUploadList, + options?: SimBulkUploadOptionalParams + ): Promise< + PollerLike, SimBulkUploadResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, simGroupName, parameters, options }, + bulkUploadOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Bulk upload SIMs to a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param options The options parameters. + */ + async beginBulkUploadAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimUploadList, + options?: SimBulkUploadOptionalParams + ): Promise { + const poller = await this.beginBulkUpload( + resourceGroupName, + simGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Bulk delete SIMs from a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param options The options parameters. + */ + async beginBulkDelete( + resourceGroupName: string, + simGroupName: string, + parameters: SimDeleteList, + options?: SimBulkDeleteOptionalParams + ): Promise< + PollerLike, SimBulkDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, simGroupName, parameters, options }, + bulkDeleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Bulk delete SIMs from a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param options The options parameters. + */ + async beginBulkDeleteAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimDeleteList, + options?: SimBulkDeleteOptionalParams + ): Promise { + const poller = await this.beginBulkDelete( + resourceGroupName, + simGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param options The options parameters. + */ + async beginBulkUploadEncrypted( + resourceGroupName: string, + simGroupName: string, + parameters: EncryptedSimUploadList, + options?: SimBulkUploadEncryptedOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimBulkUploadEncryptedResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, simGroupName, parameters, options }, + bulkUploadEncryptedOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param options The options parameters. + */ + async beginBulkUploadEncryptedAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: EncryptedSimUploadList, + options?: SimBulkUploadEncryptedOptionalParams + ): Promise { + const poller = await this.beginBulkUploadEncrypted( + resourceGroupName, + simGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const bulkUploadOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const bulkDeleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const bulkUploadEncryptedOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 201: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 202: { + bodyMapper: Mappers.AsyncOperationStatus + }, + 204: { + bodyMapper: Mappers.AsyncOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts index 740efb4d03de..e747cd99859a 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { SimPolicies } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,6 +19,7 @@ import { SimPolicy, SimPoliciesListByMobileNetworkNextOptionalParams, SimPoliciesListByMobileNetworkOptionalParams, + SimPoliciesListByMobileNetworkResponse, SimPoliciesDeleteOptionalParams, SimPoliciesGetOptionalParams, SimPoliciesGetResponse, @@ -26,7 +28,6 @@ import { TagsObject, SimPoliciesUpdateTagsOptionalParams, SimPoliciesUpdateTagsResponse, - SimPoliciesListByMobileNetworkResponse, SimPoliciesListByMobileNetworkNextResponse } from "../models"; @@ -66,11 +67,15 @@ export class SimPoliciesImpl implements SimPolicies { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByMobileNetworkPagingPage( resourceGroupName, mobileNetworkName, - options + options, + settings ); } }; @@ -79,15 +84,22 @@ export class SimPoliciesImpl implements SimPolicies { private async *listByMobileNetworkPagingPage( resourceGroupName: string, mobileNetworkName: string, - options?: SimPoliciesListByMobileNetworkOptionalParams + options?: SimPoliciesListByMobileNetworkOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByMobileNetwork( - resourceGroupName, - mobileNetworkName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: SimPoliciesListByMobileNetworkResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByMobileNetwork( + resourceGroupName, + mobileNetworkName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByMobileNetworkNext( resourceGroupName, @@ -96,7 +108,9 @@ export class SimPoliciesImpl implements SimPolicies { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -222,7 +236,7 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Creates or updates a SIM policy. + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param simPolicyName The name of the SIM policy. @@ -301,7 +315,7 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Creates or updates a SIM policy. + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param simPolicyName The name of the SIM policy. @@ -459,7 +473,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters13, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -530,7 +544,6 @@ const listByMobileNetworkNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts index d1c1974c7869..589f742e5e4b 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Sims } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -16,15 +17,15 @@ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { Sim, - SimsListBySimGroupNextOptionalParams, - SimsListBySimGroupOptionalParams, + SimsListByGroupNextOptionalParams, + SimsListByGroupOptionalParams, + SimsListByGroupResponse, SimsDeleteOptionalParams, SimsGetOptionalParams, SimsGetResponse, SimsCreateOrUpdateOptionalParams, SimsCreateOrUpdateResponse, - SimsListBySimGroupResponse, - SimsListBySimGroupNextResponse + SimsListByGroupNextResponse } from "../models"; /// @@ -46,12 +47,12 @@ export class SimsImpl implements Sims { * @param simGroupName The name of the SIM Group. * @param options The options parameters. */ - public listBySimGroup( + public listByGroup( resourceGroupName: string, simGroupName: string, - options?: SimsListBySimGroupOptionalParams + options?: SimsListByGroupOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listBySimGroupPagingAll( + const iter = this.listByGroupPagingAll( resourceGroupName, simGroupName, options @@ -63,46 +64,59 @@ export class SimsImpl implements Sims { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listBySimGroupPagingPage( + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByGroupPagingPage( resourceGroupName, simGroupName, - options + options, + settings ); } }; } - private async *listBySimGroupPagingPage( + private async *listByGroupPagingPage( resourceGroupName: string, simGroupName: string, - options?: SimsListBySimGroupOptionalParams + options?: SimsListByGroupOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listBySimGroup( - resourceGroupName, - simGroupName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: SimsListByGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByGroup( + resourceGroupName, + simGroupName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { - result = await this._listBySimGroupNext( + result = await this._listByGroupNext( resourceGroupName, simGroupName, continuationToken, options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } - private async *listBySimGroupPagingAll( + private async *listByGroupPagingAll( resourceGroupName: string, simGroupName: string, - options?: SimsListBySimGroupOptionalParams + options?: SimsListByGroupOptionalParams ): AsyncIterableIterator { - for await (const page of this.listBySimGroupPagingPage( + for await (const page of this.listByGroupPagingPage( resourceGroupName, simGroupName, options @@ -322,33 +336,33 @@ export class SimsImpl implements Sims { * @param simGroupName The name of the SIM Group. * @param options The options parameters. */ - private _listBySimGroup( + private _listByGroup( resourceGroupName: string, simGroupName: string, - options?: SimsListBySimGroupOptionalParams - ): Promise { + options?: SimsListByGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, simGroupName, options }, - listBySimGroupOperationSpec + listByGroupOperationSpec ); } /** - * ListBySimGroupNext + * ListByGroupNext * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param simGroupName The name of the SIM Group. - * @param nextLink The nextLink from the previous successful call to the ListBySimGroup method. + * @param nextLink The nextLink from the previous successful call to the ListByGroup method. * @param options The options parameters. */ - private _listBySimGroupNext( + private _listByGroupNext( resourceGroupName: string, simGroupName: string, nextLink: string, - options?: SimsListBySimGroupNextOptionalParams - ): Promise { + options?: SimsListByGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, simGroupName, nextLink, options }, - listBySimGroupNextOperationSpec + listByGroupNextOperationSpec ); } } @@ -423,7 +437,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -436,7 +450,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; -const listBySimGroupOperationSpec: coreClient.OperationSpec = { +const listByGroupOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims", httpMethod: "GET", @@ -458,7 +472,7 @@ const listBySimGroupOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listBySimGroupNextOperationSpec: coreClient.OperationSpec = { +const listByGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -469,7 +483,6 @@ const listBySimGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts index 8725698a006b..54cd3c1bd90c 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Sites } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,6 +19,7 @@ import { Site, SitesListByMobileNetworkNextOptionalParams, SitesListByMobileNetworkOptionalParams, + SitesListByMobileNetworkResponse, SitesDeleteOptionalParams, SitesGetOptionalParams, SitesGetResponse, @@ -26,7 +28,6 @@ import { TagsObject, SitesUpdateTagsOptionalParams, SitesUpdateTagsResponse, - SitesListByMobileNetworkResponse, SitesListByMobileNetworkNextResponse } from "../models"; @@ -66,11 +67,15 @@ export class SitesImpl implements Sites { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByMobileNetworkPagingPage( resourceGroupName, mobileNetworkName, - options + options, + settings ); } }; @@ -79,15 +84,22 @@ export class SitesImpl implements Sites { private async *listByMobileNetworkPagingPage( resourceGroupName: string, mobileNetworkName: string, - options?: SitesListByMobileNetworkOptionalParams + options?: SitesListByMobileNetworkOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByMobileNetwork( - resourceGroupName, - mobileNetworkName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: SitesListByMobileNetworkResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByMobileNetwork( + resourceGroupName, + mobileNetworkName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByMobileNetworkNext( resourceGroupName, @@ -96,7 +108,9 @@ export class SitesImpl implements Sites { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -115,7 +129,8 @@ export class SitesImpl implements Sites { } /** - * Deletes the specified mobile network site. + * Deletes the specified mobile network site. This will also delete any network functions that are a + * part of this 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. @@ -181,7 +196,8 @@ export class SitesImpl implements Sites { } /** - * Deletes the specified mobile network site. + * Deletes the specified mobile network site. This will also delete any network functions that are a + * part of this 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. @@ -222,7 +238,8 @@ export class SitesImpl implements Sites { } /** - * Creates or updates a mobile network site. + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile + * network. * @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. @@ -295,7 +312,8 @@ export class SitesImpl implements Sites { } /** - * Creates or updates a mobile network site. + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile + * network. * @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. @@ -447,7 +465,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters14, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -518,7 +536,6 @@ const listByMobileNetworkNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts index b603ee003b28..1377a61fce29 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Slices } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,6 +19,7 @@ import { Slice, SlicesListByMobileNetworkNextOptionalParams, SlicesListByMobileNetworkOptionalParams, + SlicesListByMobileNetworkResponse, SlicesDeleteOptionalParams, SlicesGetOptionalParams, SlicesGetResponse, @@ -26,7 +28,6 @@ import { TagsObject, SlicesUpdateTagsOptionalParams, SlicesUpdateTagsResponse, - SlicesListByMobileNetworkResponse, SlicesListByMobileNetworkNextResponse } from "../models"; @@ -66,11 +67,15 @@ export class SlicesImpl implements Slices { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByMobileNetworkPagingPage( resourceGroupName, mobileNetworkName, - options + options, + settings ); } }; @@ -79,15 +84,22 @@ export class SlicesImpl implements Slices { private async *listByMobileNetworkPagingPage( resourceGroupName: string, mobileNetworkName: string, - options?: SlicesListByMobileNetworkOptionalParams + options?: SlicesListByMobileNetworkOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByMobileNetwork( - resourceGroupName, - mobileNetworkName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: SlicesListByMobileNetworkResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByMobileNetwork( + resourceGroupName, + mobileNetworkName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByMobileNetworkNext( resourceGroupName, @@ -96,7 +108,9 @@ export class SlicesImpl implements Slices { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -222,7 +236,8 @@ export class SlicesImpl implements Slices { } /** - * Creates or updates a network slice. + * Creates or updates a network slice. Must be created in the same location as its parent mobile + * network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param sliceName The name of the network slice. @@ -295,7 +310,8 @@ export class SlicesImpl implements Slices { } /** - * Creates or updates a network slice. + * Creates or updates a network slice. Must be created in the same location as its parent mobile + * network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param sliceName The name of the network slice. @@ -447,7 +463,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters15, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -518,7 +534,6 @@ const listByMobileNetworkNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts index 72cb17ad35c4..502d29ee68ff 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts @@ -83,7 +83,8 @@ export interface AttachedDataNetworks { options?: AttachedDataNetworksGetOptionalParams ): Promise; /** - * Creates or updates an attached data network. + * Creates or updates an attached data network. Must be created in the same location as its parent + * packet core data 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 packetCoreDataPlaneName The name of the packet core data plane. @@ -105,7 +106,8 @@ export interface AttachedDataNetworks { > >; /** - * Creates or updates an attached data network. + * Creates or updates an attached data network. Must be created in the same location as its parent + * packet core data 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 packetCoreDataPlaneName The name of the packet core data plane. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts index 7d486d6660d4..f73736c828d2 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts @@ -75,7 +75,8 @@ export interface DataNetworks { options?: DataNetworksGetOptionalParams ): Promise; /** - * Creates or updates a data network. + * Creates or updates a data network. Must be created in the same location as its parent mobile + * network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param dataNetworkName The name of the data network. @@ -95,7 +96,8 @@ export interface DataNetworks { > >; /** - * Creates or updates a data network. + * Creates or updates a data network. Must be created in the same location as its parent mobile + * network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param dataNetworkName The name of the data network. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts index 837e063c3d2a..b5fbea4bf05f 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts @@ -9,13 +9,15 @@ export * from "./attachedDataNetworks"; export * from "./dataNetworks"; export * from "./mobileNetworks"; -export * from "./sites"; -export * from "./simGroups"; -export * from "./sims"; export * from "./operations"; export * from "./packetCoreControlPlanes"; +export * from "./packetCoreControlPlaneOperations"; export * from "./packetCoreControlPlaneVersions"; export * from "./packetCoreDataPlanes"; export * from "./services"; +export * from "./sims"; +export * from "./simOperations"; +export * from "./simGroups"; export * from "./simPolicies"; +export * from "./sites"; export * from "./slices"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts index 9a4a9d775d3e..81f695fbd218 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts @@ -19,9 +19,7 @@ import { MobileNetworksCreateOrUpdateResponse, TagsObject, MobileNetworksUpdateTagsOptionalParams, - MobileNetworksUpdateTagsResponse, - MobileNetworksListSimIdsOptionalParams, - MobileNetworksListSimIdsResponse + MobileNetworksUpdateTagsResponse } from "../models"; /// @@ -120,31 +118,4 @@ export interface MobileNetworks { parameters: TagsObject, options?: MobileNetworksUpdateTagsOptionalParams ): Promise; - /** - * Lists the IDs of all provisioned SIMs in a mobile network - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param mobileNetworkName The name of the mobile network. - * @param options The options parameters. - */ - beginListSimIds( - resourceGroupName: string, - mobileNetworkName: string, - options?: MobileNetworksListSimIdsOptionalParams - ): Promise< - PollerLike< - PollOperationState, - MobileNetworksListSimIdsResponse - > - >; - /** - * Lists the IDs of all provisioned SIMs in a mobile network - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param mobileNetworkName The name of the mobile network. - * @param options The options parameters. - */ - beginListSimIdsAndWait( - resourceGroupName: string, - mobileNetworkName: string, - options?: MobileNetworksListSimIdsOptionalParams - ): Promise; } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneOperations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneOperations.ts new file mode 100644 index 000000000000..8990008c94ed --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneOperations.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PacketCoreControlPlaneRollbackOptionalParams, + PacketCoreControlPlaneRollbackResponse, + PacketCoreControlPlaneReinstallOptionalParams, + PacketCoreControlPlaneReinstallResponse, + PacketCoreControlPlaneCollectDiagnosticsPackage, + PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams, + PacketCoreControlPlaneCollectDiagnosticsPackageResponse +} from "../models"; + +/** Interface representing a PacketCoreControlPlaneOperations. */ +export interface PacketCoreControlPlaneOperations { + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". + * Multiple consecutive rollbacks are not possible. This action may cause a service outage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + beginRollback( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlaneRollbackOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PacketCoreControlPlaneRollbackResponse + > + >; + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". + * Multiple consecutive rollbacks are not possible. This action may cause a service outage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + beginRollbackAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlaneRollbackOptionalParams + ): Promise; + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state + * from the packet core to return it to a known state. This action will cause a service outage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + beginReinstall( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlaneReinstallOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PacketCoreControlPlaneReinstallResponse + > + >; + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state + * from the packet core to return it to a known state. This action will cause a service outage. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param options The options parameters. + */ + beginReinstallAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + options?: PacketCoreControlPlaneReinstallOptionalParams + ): Promise; + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload + * the diagnostics to a storage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package + * operation. + * @param options The options parameters. + */ + beginCollectDiagnosticsPackage( + resourceGroupName: string, + packetCoreControlPlaneName: string, + parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, + options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams + ): Promise< + PollerLike< + PollOperationState< + PacketCoreControlPlaneCollectDiagnosticsPackageResponse + >, + PacketCoreControlPlaneCollectDiagnosticsPackageResponse + > + >; + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload + * the diagnostics to a storage account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package + * operation. + * @param options The options parameters. + */ + beginCollectDiagnosticsPackageAndWait( + resourceGroupName: string, + packetCoreControlPlaneName: string, + parameters: PacketCoreControlPlaneCollectDiagnosticsPackage, + options?: PacketCoreControlPlaneCollectDiagnosticsPackageOptionalParams + ): Promise; +} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts index 93228208091b..14289e1d8898 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts @@ -9,7 +9,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PacketCoreControlPlaneVersion, - PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams, + PacketCoreControlPlaneVersionsListOptionalParams, PacketCoreControlPlaneVersionsGetOptionalParams, PacketCoreControlPlaneVersionsGetResponse } from "../models"; @@ -21,8 +21,8 @@ export interface PacketCoreControlPlaneVersions { * Lists all supported packet core control planes versions. * @param options The options parameters. */ - listByResourceGroup( - options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + list( + options?: PacketCoreControlPlaneVersionsListOptionalParams ): PagedAsyncIterableIterator; /** * Gets information about the specified packet core control plane version. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts index 1c618e0680c7..250106ed8056 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts @@ -75,7 +75,8 @@ export interface PacketCoreDataPlanes { options?: PacketCoreDataPlanesGetOptionalParams ): Promise; /** - * Creates or updates a packet core data plane. + * Creates or updates a packet core data plane. Must be created in the same location as its parent + * 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 packetCoreDataPlaneName The name of the packet core data plane. @@ -95,7 +96,8 @@ export interface PacketCoreDataPlanes { > >; /** - * Creates or updates a packet core data plane. + * Creates or updates a packet core data plane. Must be created in the same location as its parent + * 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 packetCoreDataPlaneName The name of the packet core data plane. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts index 2b97e36bf843..671bfe40bb53 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts @@ -78,7 +78,7 @@ export interface Services { options?: ServicesGetOptionalParams ): Promise; /** - * Creates or updates a service. + * Creates or updates a service. Must be created in the same location as its parent mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param serviceName The name of the service. You must not use any of the following reserved strings - @@ -99,7 +99,7 @@ export interface Services { > >; /** - * Creates or updates a service. + * Creates or updates a service. Must be created in the same location as its parent mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param serviceName The name of the service. You must not use any of the following reserved strings - diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simOperations.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simOperations.ts new file mode 100644 index 000000000000..7e2573a21d48 --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simOperations.ts @@ -0,0 +1,111 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SimUploadList, + SimBulkUploadOptionalParams, + SimBulkUploadResponse, + SimDeleteList, + SimBulkDeleteOptionalParams, + SimBulkDeleteResponse, + EncryptedSimUploadList, + SimBulkUploadEncryptedOptionalParams, + SimBulkUploadEncryptedResponse +} from "../models"; + +/** Interface representing a SimOperations. */ +export interface SimOperations { + /** + * Bulk upload SIMs to a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param options The options parameters. + */ + beginBulkUpload( + resourceGroupName: string, + simGroupName: string, + parameters: SimUploadList, + options?: SimBulkUploadOptionalParams + ): Promise< + PollerLike, SimBulkUploadResponse> + >; + /** + * Bulk upload SIMs to a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param options The options parameters. + */ + beginBulkUploadAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimUploadList, + options?: SimBulkUploadOptionalParams + ): Promise; + /** + * Bulk delete SIMs from a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param options The options parameters. + */ + beginBulkDelete( + resourceGroupName: string, + simGroupName: string, + parameters: SimDeleteList, + options?: SimBulkDeleteOptionalParams + ): Promise< + PollerLike, SimBulkDeleteResponse> + >; + /** + * Bulk delete SIMs from a SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param options The options parameters. + */ + beginBulkDeleteAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimDeleteList, + options?: SimBulkDeleteOptionalParams + ): Promise; + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param options The options parameters. + */ + beginBulkUploadEncrypted( + resourceGroupName: string, + simGroupName: string, + parameters: EncryptedSimUploadList, + options?: SimBulkUploadEncryptedOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimBulkUploadEncryptedResponse + > + >; + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param options The options parameters. + */ + beginBulkUploadEncryptedAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: EncryptedSimUploadList, + options?: SimBulkUploadEncryptedOptionalParams + ): Promise; +} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts index 55230429abb2..b1cffb1375d0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts @@ -75,7 +75,7 @@ export interface SimPolicies { options?: SimPoliciesGetOptionalParams ): Promise; /** - * Creates or updates a SIM policy. + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param simPolicyName The name of the SIM policy. @@ -95,7 +95,7 @@ export interface SimPolicies { > >; /** - * Creates or updates a SIM policy. + * Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param simPolicyName The name of the SIM policy. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts index e27b14792f94..a6e6e35763d7 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { Sim, - SimsListBySimGroupOptionalParams, + SimsListByGroupOptionalParams, SimsDeleteOptionalParams, SimsGetOptionalParams, SimsGetResponse, @@ -27,10 +27,10 @@ export interface Sims { * @param simGroupName The name of the SIM Group. * @param options The options parameters. */ - listBySimGroup( + listByGroup( resourceGroupName: string, simGroupName: string, - options?: SimsListBySimGroupOptionalParams + options?: SimsListByGroupOptionalParams ): PagedAsyncIterableIterator; /** * Deletes the specified SIM. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts index fb27ae93abbc..e875c0a409fe 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts @@ -36,7 +36,8 @@ export interface Sites { options?: SitesListByMobileNetworkOptionalParams ): PagedAsyncIterableIterator; /** - * Deletes the specified mobile network site. + * Deletes the specified mobile network site. This will also delete any network functions that are a + * part of this 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. @@ -49,7 +50,8 @@ export interface Sites { options?: SitesDeleteOptionalParams ): Promise, void>>; /** - * Deletes the specified mobile network site. + * Deletes the specified mobile network site. This will also delete any network functions that are a + * part of this 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. @@ -75,7 +77,8 @@ export interface Sites { options?: SitesGetOptionalParams ): Promise; /** - * Creates or updates a mobile network site. + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile + * network. * @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. @@ -95,7 +98,8 @@ export interface Sites { > >; /** - * Creates or updates a mobile network site. + * Creates or updates a mobile network site. Must be created in the same location as its parent mobile + * network. * @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. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts index c3ae841c0b17..bcb7796c65c4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts @@ -75,7 +75,8 @@ export interface Slices { options?: SlicesGetOptionalParams ): Promise; /** - * Creates or updates a network slice. + * Creates or updates a network slice. Must be created in the same location as its parent mobile + * network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param sliceName The name of the network slice. @@ -95,7 +96,8 @@ export interface Slices { > >; /** - * Creates or updates a network slice. + * Creates or updates a network slice. Must be created in the same location as its parent mobile + * network. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param sliceName The name of the network slice. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/pagingHelper.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/pagingHelper.ts new file mode 100644 index 000000000000..269a2b9814b5 --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from + * that point later. + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. + */ +export function getContinuationToken(page: unknown): string | undefined { + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken( + page: unknown, + continuationToken: string | undefined +): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/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"