diff --git a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md index 68c4cc184937..d29805c9b682 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/CHANGELOG.md @@ -1,5 +1,86 @@ # Release History +## 1.0.0-beta.3 (2022-07-19) + +**Features** + + - Added operation group PacketCoreControlPlaneVersions + - Added operation group SimGroups + - Added operation Sims.listBySimGroup + - Added Interface AzureStackEdgeDeviceResourceId + - Added Interface ConnectedClusterResourceId + - Added Interface KeyVaultCertificate + - Added Interface KeyVaultKey + - Added Interface LocalDiagnosticsAccessConfiguration + - Added Interface ManagedServiceIdentity + - Added Interface PacketCoreControlPlaneVersionListResult + - Added Interface PacketCoreControlPlaneVersionsGetOptionalParams + - Added Interface PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams + - Added Interface PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + - Added Interface PlatformConfiguration + - 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 SimsListBySimGroupNextOptionalParams + - Added Interface SimsListBySimGroupOptionalParams + - Added Interface UserAssignedIdentity + - Added Type Alias BillingSku + - Added Type Alias ManagedServiceIdentityType + - Added Type Alias PacketCoreControlPlaneVersion + - Added Type Alias PacketCoreControlPlaneVersionsGetResponse + - Added Type Alias PacketCoreControlPlaneVersionsListByResourceGroupNextResponse + - Added Type Alias PacketCoreControlPlaneVersionsListByResourceGroupResponse + - Added Type Alias PlatformType + - Added Type Alias ProxyResource + - Added Type Alias RecommendedVersion + - Added Type Alias SimGroup + - 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 + - Add parameters of ProxyResource to TypeAlias Sim + - Type Alias AttachedDataNetwork has a new parameter dnsAddresses + - Type Alias PacketCoreControlPlane has a new parameter identity + - Type Alias PacketCoreControlPlane has a new parameter platform + - Type Alias PacketCoreControlPlane has a new parameter localDiagnosticsAccess + - Type Alias PacketCoreControlPlane has a new parameter interopSettings + - 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 + - Delete parameters of TrackedResource in TypeAlias Sim + - Type Alias PacketCoreControlPlane no longer has parameter customLocation + - Type Alias Sim no longer has parameter mobileNetwork + - Type Alias PacketCoreControlPlane has a new parameter sku + + ## 1.0.0-beta.2 (2022-03-23) **Features** diff --git a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json index 52c47d12197c..45b142456e86 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/_meta.json +++ b/sdk/mobilenetwork/arm-mobilenetwork/_meta.json @@ -1,8 +1,8 @@ { - "commit": "82fdf284eea880a8e027c354911a814999a77178", + "commit": "778b1621b49e171a89b429de6c7eac9cc4fb332b", "readme": "specification/mobilenetwork/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mobilenetwork\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.17 --generate-sample=true", + "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=/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-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.0", - "use": "@autorest/typescript@6.0.0-beta.17" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/mobilenetwork/arm-mobilenetwork/package.json b/sdk/mobilenetwork/arm-mobilenetwork/package.json index e2898138c155..e915eda0c21b 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.2", + "version": "1.0.0-beta.3", "engines": { "node": ">=12.0.0" }, @@ -11,9 +11,9 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.0.0", + "@azure/core-client": "^1.5.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" }, "keywords": [ @@ -40,9 +40,11 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mobilenetwork/arm-mobilenetwork", "repository": { @@ -93,7 +95,7 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -106,13 +108,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.js b/sdk/mobilenetwork/arm-mobilenetwork/recordings/node/my_test/recording_sample_test.js deleted file mode 100644 index 0f6ecb857acf..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/recordings/node/my_test/recording_sample_test.js +++ /dev/null @@ -1,5 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7a6be38bb8cb644d64b4094802301751"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md index d6d20f27e85f..2f1cd1b0fb5a 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md +++ b/sdk/mobilenetwork/arm-mobilenetwork/review/arm-mobilenetwork.api.md @@ -27,6 +27,7 @@ export interface Arp { export type AttachedDataNetwork = TrackedResource & { readonly provisioningState?: ProvisioningState; userPlaneDataInterface: InterfaceProperties; + dnsAddresses?: string[]; naptConfiguration?: NaptConfiguration; userEquipmentAddressPoolPrefix?: string[]; userEquipmentStaticAddressPoolPrefix?: string[]; @@ -97,6 +98,19 @@ export interface AttachedDataNetworksUpdateTagsOptionalParams extends coreClient // @public export type AttachedDataNetworksUpdateTagsResponse = AttachedDataNetwork; +// @public +export interface AzureStackEdgeDeviceResourceId { + id: string; +} + +// @public +export type BillingSku = string; + +// @public +export interface ConnectedClusterResourceId { + id: string; +} + // @public export type CoreNetworkType = string; @@ -217,7 +231,28 @@ export interface InterfaceProperties { ipv4Address?: string; ipv4Gateway?: string; ipv4Subnet?: string; - name: string; + name?: string; +} + +// @public +export interface KeyVaultCertificate { + certificateUrl?: string; +} + +// @public +export interface KeyVaultKey { + keyUrl?: string; +} + +// @public +export enum KnownBillingSku { + EdgeSite2Gbps = "EdgeSite2GBPS", + EdgeSite3Gbps = "EdgeSite3GBPS", + EdgeSite4Gbps = "EdgeSite4GBPS", + EvaluationPackage = "EvaluationPackage", + FlagshipStarterPackage = "FlagshipStarterPackage", + LargePackage = "LargePackage", + MediumPackage = "MediumPackage" } // @public @@ -238,6 +273,18 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownManagedServiceIdentityType { + // (undocumented) + None = "None", + // (undocumented) + SystemAssigned = "SystemAssigned", + // (undocumented) + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", + // (undocumented) + UserAssigned = "UserAssigned" +} + // @public export enum KnownNaptEnabled { Disabled = "Disabled", @@ -252,6 +299,12 @@ export enum KnownPduSessionType { IPv6 = "IPv6" } +// @public +export enum KnownPlatformType { + AKSHCI = "AKS-HCI", + BaseVM = "BaseVM" +} + // @public export enum KnownPreemptionCapability { MayPreempt = "MayPreempt", @@ -282,6 +335,12 @@ export enum KnownProvisioningState { Unknown = "Unknown" } +// @public +export enum KnownRecommendedVersion { + NotRecommended = "NotRecommended", + Recommended = "Recommended" +} + // @public export enum KnownSdfDirection { Bidirectional = "Bidirectional", @@ -302,6 +361,34 @@ export enum KnownTrafficControlPermission { Enabled = "Enabled" } +// @public +export enum KnownVersionState { + Active = "Active", + Deprecated = "Deprecated", + Preview = "Preview", + Unknown = "Unknown", + Validating = "Validating", + ValidationFailed = "ValidationFailed" +} + +// @public +export interface LocalDiagnosticsAccessConfiguration { + httpsServerCertificate?: KeyVaultCertificate; +} + +// @public +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; +} + +// @public +export type ManagedServiceIdentityType = string; + // @public export type MobileNetwork = TrackedResource & { readonly provisioningState?: ProvisioningState; @@ -333,10 +420,14 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { // (undocumented) packetCoreControlPlanes: PacketCoreControlPlanes; // (undocumented) + packetCoreControlPlaneVersions: PacketCoreControlPlaneVersions; + // (undocumented) packetCoreDataPlanes: PacketCoreDataPlanes; // (undocumented) services: Services; // (undocumented) + simGroups: SimGroups; + // (undocumented) simPolicies: SimPolicies; // (undocumented) sims: Sims; @@ -494,12 +585,16 @@ export type OperationsListResponse = OperationList; // @public export type PacketCoreControlPlane = TrackedResource & { + identity?: ManagedServiceIdentity; readonly provisioningState?: ProvisioningState; mobileNetwork: MobileNetworkResourceId; - customLocation?: CustomLocationResourceId; + platform?: PlatformConfiguration; coreNetworkTechnology?: CoreNetworkType; version?: string; controlPlaneAccessInterface: InterfaceProperties; + sku: BillingSku; + localDiagnosticsAccess?: LocalDiagnosticsAccessConfiguration; + interopSettings?: Record; }; // @public @@ -577,6 +672,46 @@ export interface PacketCoreControlPlanesUpdateTagsOptionalParams extends coreCli // @public export type PacketCoreControlPlanesUpdateTagsResponse = PacketCoreControlPlane; +// @public +export type PacketCoreControlPlaneVersion = ProxyResource & { + readonly provisioningState?: ProvisioningState; + versionState?: VersionState; + recommendedVersion?: RecommendedVersion; +}; + +// @public +export interface PacketCoreControlPlaneVersionListResult { + readonly nextLink?: string; + value?: PacketCoreControlPlaneVersion[]; +} + +// @public +export interface PacketCoreControlPlaneVersions { + get(versionName: string, options?: PacketCoreControlPlaneVersionsGetOptionalParams): Promise; + listByResourceGroup(options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PacketCoreControlPlaneVersionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PacketCoreControlPlaneVersionsGetResponse = PacketCoreControlPlaneVersion; + +// @public +export interface PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PacketCoreControlPlaneVersionsListByResourceGroupNextResponse = PacketCoreControlPlaneVersionListResult; + +// @public +export interface PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PacketCoreControlPlaneVersionsListByResourceGroupResponse = PacketCoreControlPlaneVersionListResult; + // @public export type PacketCoreDataPlane = TrackedResource & { readonly provisioningState?: ProvisioningState; @@ -667,6 +802,17 @@ export interface PinholeTimeouts { udp?: number; } +// @public +export interface PlatformConfiguration { + azureStackEdgeDevice?: AzureStackEdgeDeviceResourceId; + connectedCluster?: ConnectedClusterResourceId; + customLocation?: CustomLocationResourceId; + type: PlatformType; +} + +// @public +export type PlatformType = string; + // @public export interface PlmnId { mcc: string; @@ -694,6 +840,9 @@ export type PreemptionVulnerability = string; // @public export type ProvisioningState = string; +// @public +export type ProxyResource = Resource & {}; + // @public export interface QosPolicy { allocationAndRetentionPriorityLevel?: number; @@ -703,6 +852,9 @@ export interface QosPolicy { preemptionVulnerability?: PreemptionVulnerability; } +// @public +export type RecommendedVersion = string; + // @public export interface Resource { readonly id?: string; @@ -797,19 +949,106 @@ export interface ServicesUpdateTagsOptionalParams extends coreClient.OperationOp export type ServicesUpdateTagsResponse = Service; // @public -export type Sim = TrackedResource & { +export type Sim = ProxyResource & { readonly provisioningState?: ProvisioningState; readonly simState?: SimState; internationalMobileSubscriberIdentity: string; integratedCircuitCardIdentifier?: string; authenticationKey?: string; operatorKeyCode?: string; - mobileNetwork?: MobileNetworkResourceId; deviceType?: string; simPolicy?: SimPolicyResourceId; staticIpConfiguration?: SimStaticIpProperties[]; }; +// @public +export type SimGroup = TrackedResource & { + identity?: ManagedServiceIdentity; + readonly provisioningState?: ProvisioningState; + encryptionKey?: KeyVaultKey; + mobileNetwork?: MobileNetworkResourceId; +}; + +// @public +export interface SimGroupListResult { + readonly nextLink?: string; + value?: SimGroup[]; +} + +// @public +export interface SimGroupResourceId { + id: string; +} + +// @public +export interface SimGroups { + beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams): Promise, SimGroupsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, simGroupName: string, parameters: SimGroup, options?: SimGroupsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, simGroupName: string, options?: SimGroupsDeleteOptionalParams): Promise; + get(resourceGroupName: string, simGroupName: string, options?: SimGroupsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: SimGroupsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: SimGroupsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, simGroupName: string, parameters: TagsObject, options?: SimGroupsUpdateTagsOptionalParams): Promise; +} + +// @public +export interface SimGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SimGroupsCreateOrUpdateResponse = SimGroup; + +// @public +export interface SimGroupsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface SimGroupsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SimGroupsGetResponse = SimGroup; + +// @public +export interface SimGroupsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SimGroupsListByResourceGroupNextResponse = SimGroupListResult; + +// @public +export interface SimGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SimGroupsListByResourceGroupResponse = SimGroupListResult; + +// @public +export interface SimGroupsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SimGroupsListBySubscriptionNextResponse = SimGroupListResult; + +// @public +export interface SimGroupsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SimGroupsListBySubscriptionResponse = SimGroupListResult; + +// @public +export interface SimGroupsUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SimGroupsUpdateTagsResponse = SimGroup; + // @public export interface SimIdListResult { readonly nextLink?: string; @@ -899,14 +1138,12 @@ export interface SimPolicyResourceId { // @public export interface Sims { - beginCreateOrUpdate(resourceGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise, SimsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise; - get(resourceGroupName: string, simName: string, options?: SimsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: SimsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: SimsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, simName: string, parameters: TagsObject, options?: SimsUpdateTagsOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise, SimsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, simGroupName: string, simName: string, options?: SimsDeleteOptionalParams): Promise, void>>; + 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; } // @public @@ -932,32 +1169,18 @@ export interface SimsGetOptionalParams extends coreClient.OperationOptions { export type SimsGetResponse = Sim; // @public -export interface SimsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface SimsListBySimGroupNextOptionalParams extends coreClient.OperationOptions { } // @public -export type SimsListByResourceGroupNextResponse = SimListResult; +export type SimsListBySimGroupNextResponse = SimListResult; // @public -export interface SimsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface SimsListBySimGroupOptionalParams extends coreClient.OperationOptions { } // @public -export type SimsListByResourceGroupResponse = SimListResult; - -// @public -export interface SimsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SimsListBySubscriptionNextResponse = SimListResult; - -// @public -export interface SimsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SimsListBySubscriptionResponse = SimListResult; +export type SimsListBySimGroupResponse = SimListResult; // @public export type SimState = string; @@ -974,13 +1197,6 @@ export interface SimStaticIpPropertiesStaticIp { ipv4Address?: string; } -// @public -export interface SimsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SimsUpdateTagsResponse = Sim; - // @public export type Site = TrackedResource & { readonly provisioningState?: ProvisioningState; @@ -1165,6 +1381,15 @@ export type TrackedResource = Resource & { // @public export type TrafficControlPermission = string; +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export type VersionState = string; + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/mobilenetwork/arm-mobilenetwork/sample.env b/sdk/mobilenetwork/arm-mobilenetwork/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/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-dev/attachedDataNetworksCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts deleted file mode 100644 index b649e7d2fcda..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/attachedDataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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-03-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 = { - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 60, tcp: 7440, udp: 300 }, - portRange: { maxPort: 65535, 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 d00ff5e783f2..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-03-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 f586f81676b7..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-03-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 bd726216e8bc..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 data networks associated with a packet core data plane. - * - * @summary Gets all the data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 cdd783059026..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 update tags. - * - * @summary Updates an attached data network update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 c2b1e06a0d33..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 mobile network dataNetwork. - * - * @summary Creates or updates a mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkCreate.json - */ -async function createMobileNetworkDataNetwork() { - 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); -} - -createMobileNetworkDataNetwork().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 e276a41c6447..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 mobile network dataNetwork. - * - * @summary Deletes the specified mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkDelete.json - */ -async function deleteMobileNetworkDataNetwork() { - 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); -} - -deleteMobileNetworkDataNetwork().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 27e4c1edc6a3..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 mobile network dataNetwork. - * - * @summary Gets information about the specified mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkGet.json - */ -async function getMobileNetworkDataNetwork() { - 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); -} - -getMobileNetworkDataNetwork().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 a1d571e01bf6..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 dataNetworks in the mobile network. - * - * @summary Lists all dataNetworks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkListByMobileNetwork.json - */ -async function listMobileNetworkDataNetworksInAMobileNetwork() { - 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); -} - -listMobileNetworkDataNetworksInAMobileNetwork().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 4c7f5c652e73..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 Update data network tags. - * - * @summary Update data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 62c2d80564dd..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-03-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 5b74c57cadcd..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-03-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 3070c3d2445b..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-03-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 82055f8ca035..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-03-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 ff2a7364b78d..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-03-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 36e9c53fedc6..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 List sim ids under a mobile network. - * - * @summary List sim ids under a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimIdListByMobileNetwork.json - */ -async function listSimProfileIdsByNetwork() { - 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); -} - -listSimProfileIdsByNetwork().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 caccc0515d61..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 a mobile network update tags. - * - * @summary Updates a mobile network update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 1c1ffc3a4094..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-03-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/packetCoreControlPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.ts deleted file mode 100644 index d679044f1456..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/packetCoreControlPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a PacketCoreControlPlane. - * - * @summary Creates or updates a PacketCoreControlPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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", - customLocation: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation" - }, - location: "eastus", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - }, - 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 d6d3b88e8c31..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-03-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 d83ff52d5021..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-03-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 e766082206f8..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 packetCoreControlPlanes in a resource group. - * - * @summary Lists all the packetCoreControlPlanes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 a15caf51fc69..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 packetCoreControlPlanes in a subscription. - * - * @summary Lists all the packetCoreControlPlanes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 0f919bd85f77..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 a PacketCoreControlPlane update tags. - * - * @summary Updates a PacketCoreControlPlane update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 3fd3004603f4..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 PacketCoreDataPlane. - * - * @summary Creates or updates a PacketCoreDataPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 57d855a2d4c1..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-03-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 ad3102d47783..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-03-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 705ed074caf5..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 packetCoreDataPlanes associated with a packetCoreControlPlane. - * - * @summary Lists all the packetCoreDataPlanes associated with a packetCoreControlPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 4aa425aec5e1..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 a PacketCoreDataPlane update tags. - * - * @summary Updates a PacketCoreDataPlane update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 0c24833f6cc7..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-03-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 d21d38be2166..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-03-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 549c700f8a1a..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-03-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 0cb8cc49feaa..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-03-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 0a2fd0f69328..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 Update service tags. - * - * @summary Update service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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/simPoliciesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b000a31713e6..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 SimPolicy. - * - * @summary Creates or updates a SimPolicy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 68810f261c4d..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-03-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 ad97e3537b0c..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-03-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 0910ce98cdb4..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 simPolicies in a mobile network. - * - * @summary Gets all the simPolicies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 5b804d50b4e9..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 Update sim policy tags. - * - * @summary Update sim policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 33322818adfe..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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-03-01-preview/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simName = "testSim"; - const parameters: Sim = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - location: "testLocation", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - }, - 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, - 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 33b03f3f2a27..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsDeleteSample.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. - * - * @summary Deletes the specified sim. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = "subid"; - const resourceGroupName = "testResourceGroupName"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait( - resourceGroupName, - 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 ab22189e47a6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsGetSample.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. - * - * @summary Gets information about the specified sim. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = "subid"; - const resourceGroupName = "testResourceGroupName"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get(resourceGroupName, simName); - console.log(result); -} - -getSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByResourceGroupSample.ts deleted file mode 100644 index 775a8c78eaa7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListByResourceGroupSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets all the Sims in a subscription. - * - * @summary Gets all the Sims in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListByResourceGroup.json - */ -async function listSimsInAResourceGroup() { - 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.sims.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listSimsInAResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListBySubscriptionSample.ts deleted file mode 100644 index cbfb76d10e09..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsListBySubscriptionSample.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 sims in a subscription. - * - * @summary Gets all the sims in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListBySubscription.json - */ -async function listSimsInASubscription() { - const subscriptionId = "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listSimsInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsUpdateTagsSample.ts deleted file mode 100644 index 41f3924b789f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples-dev/simsUpdateTagsSample.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 a sim update tags. - * - * @summary Updates a sim update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimUpdateTags.json - */ -async function updateSimTags() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simName = "testSim"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.updateTags( - resourceGroupName, - simName, - parameters - ); - console.log(result); -} - -updateSimTags().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 499fe78d64cb..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-03-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 a43c60718394..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-03-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 7a2e3c9deb61..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-03-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 cad8963df0c3..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-03-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 416193363d0b..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 a site update tags. - * - * @summary Updates a site update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 c87a2a545529..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 mobile network slice. - * - * @summary Creates or updates a mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceCreate.json - */ -async function createMobileNetworkSlice() { - 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); -} - -createMobileNetworkSlice().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 c8dc7f3c8ec7..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 mobile network slice. - * - * @summary Deletes the specified mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceDelete.json - */ -async function deleteMobileNetworkSlice() { - 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); -} - -deleteMobileNetworkSlice().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 d977f3fbca3f..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 mobile network slice. - * - * @summary Gets information about the specified mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceGet.json - */ -async function getMobileNetworkSlice() { - 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); -} - -getMobileNetworkSlice().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 63117a8f8664..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-03-01-preview/examples/SliceListByMobileNetwork.json - */ -async function listMobileNetworkSlicesInAMobileNetwork() { - 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); -} - -listMobileNetworkSlicesInAMobileNetwork().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 f1a2b1ca8d3b..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 Update slice tags. - * - * @summary Update slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceUpdateTags.json - */ -async function updateMobileNetworkSliceTags() { - 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); -} - -updateMobileNetworkSliceTags().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 d64edf28a2b9..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,158 +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-03-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-03-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-03-01-preview/examples/AttachedDataNetworkGet.json | -| [attachedDataNetworksListByPacketCoreDataPlaneSample.js][attacheddatanetworkslistbypacketcoredataplanesample] | Gets all the data networks associated with a packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/AttachedDataNetworkListByPacketCoreDataPlane.json | -| [attachedDataNetworksUpdateTagsSample.js][attacheddatanetworksupdatetagssample] | Updates an attached data network update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/AttachedDataNetworkUpdateTags.json | -| [dataNetworksCreateOrUpdateSample.js][datanetworkscreateorupdatesample] | Creates or updates a mobile network dataNetwork. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkCreate.json | -| [dataNetworksDeleteSample.js][datanetworksdeletesample] | Deletes the specified mobile network dataNetwork. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkDelete.json | -| [dataNetworksGetSample.js][datanetworksgetsample] | Gets information about the specified mobile network dataNetwork. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkGet.json | -| [dataNetworksListByMobileNetworkSample.js][datanetworkslistbymobilenetworksample] | Lists all dataNetworks in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkListByMobileNetwork.json | -| [dataNetworksUpdateTagsSample.js][datanetworksupdatetagssample] | Update data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-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-03-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-03-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-03-01-preview/examples/MobileNetworkListBySubscription.json | -| [mobileNetworksListSimIdsSample.js][mobilenetworkslistsimidssample] | List sim ids under a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimIdListByMobileNetwork.json | -| [mobileNetworksUpdateTagsSample.js][mobilenetworksupdatetagssample] | Updates a mobile network update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/OperationList.json | -| [packetCoreControlPlanesCreateOrUpdateSample.js][packetcorecontrolplanescreateorupdatesample] | Creates or updates a PacketCoreControlPlane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-01-preview/examples/PacketCoreControlPlaneGet.json | -| [packetCoreControlPlanesListByResourceGroupSample.js][packetcorecontrolplaneslistbyresourcegroupsample] | Lists all the packetCoreControlPlanes in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreControlPlaneListByResourceGroup.json | -| [packetCoreControlPlanesListBySubscriptionSample.js][packetcorecontrolplaneslistbysubscriptionsample] | Lists all the packetCoreControlPlanes in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreControlPlaneListBySubscription.json | -| [packetCoreControlPlanesUpdateTagsSample.js][packetcorecontrolplanesupdatetagssample] | Updates a PacketCoreControlPlane update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreControlPlaneUpdateTags.json | -| [packetCoreDataPlanesCreateOrUpdateSample.js][packetcoredataplanescreateorupdatesample] | Creates or updates a PacketCoreDataPlane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-01-preview/examples/PacketCoreDataPlaneGet.json | -| [packetCoreDataPlanesListByPacketCoreControlPlaneSample.js][packetcoredataplaneslistbypacketcorecontrolplanesample] | Lists all the packetCoreDataPlanes associated with a packetCoreControlPlane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json | -| [packetCoreDataPlanesUpdateTagsSample.js][packetcoredataplanesupdatetagssample] | Updates a PacketCoreDataPlane update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/ServiceCreate.json | -| [servicesDeleteSample.js][servicesdeletesample] | Deletes the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-01-preview/examples/ServiceListByMobileNetwork.json | -| [servicesUpdateTagsSample.js][servicesupdatetagssample] | Update service tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/ServiceUpdateTags.json | -| [simPoliciesCreateOrUpdateSample.js][simpoliciescreateorupdatesample] | Creates or updates a SimPolicy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-01-preview/examples/SimPolicyGet.json | -| [simPoliciesListByMobileNetworkSample.js][simpolicieslistbymobilenetworksample] | Gets all the simPolicies in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimPolicyListByMobileNetwork.json | -| [simPoliciesUpdateTagsSample.js][simpoliciesupdatetagssample] | Update sim policy tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/SimCreate.json | -| [simsDeleteSample.js][simsdeletesample] | Deletes the specified sim. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/SimGet.json | -| [simsListByResourceGroupSample.js][simslistbyresourcegroupsample] | Gets all the Sims in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListByResourceGroup.json | -| [simsListBySubscriptionSample.js][simslistbysubscriptionsample] | Gets all the sims in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListBySubscription.json | -| [simsUpdateTagsSample.js][simsupdatetagssample] | Updates a sim update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimUpdateTags.json | -| [sitesCreateOrUpdateSample.js][sitescreateorupdatesample] | Creates or updates a mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-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-03-01-preview/examples/SiteListByMobileNetwork.json | -| [sitesUpdateTagsSample.js][sitesupdatetagssample] | Updates a site update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SiteUpdateTags.json | -| [slicesCreateOrUpdateSample.js][slicescreateorupdatesample] | Creates or updates a mobile network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceCreate.json | -| [slicesDeleteSample.js][slicesdeletesample] | Deletes the specified mobile network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceDelete.json | -| [slicesGetSample.js][slicesgetsample] | Gets information about the specified mobile network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/SliceListByMobileNetwork.json | -| [slicesUpdateTagsSample.js][slicesupdatetagssample] | Update slice tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceUpdateTags.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). - -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 -[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 -[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 -[simslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListByResourceGroupSample.js -[simslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListBySubscriptionSample.js -[simsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsUpdateTagsSample.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 8bd02c080d76..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/attachedDataNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -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-03-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 = { - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 60, tcp: 7440, udp: 300 }, - portRange: { maxPort: 65535, 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 3d113c48634d..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-03-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 ea4c8214d810..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-03-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 2e5719ec416b..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 data networks associated with a packet core data plane. - * - * @summary Gets all the data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 cb66fb60a5bc..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 update tags. - * - * @summary Updates an attached data network update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 e83db36a0607..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 mobile network dataNetwork. - * - * @summary Creates or updates a mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkCreate.json - */ -async function createMobileNetworkDataNetwork() { - 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); -} - -createMobileNetworkDataNetwork().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 347c82132666..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 mobile network dataNetwork. - * - * @summary Deletes the specified mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkDelete.json - */ -async function deleteMobileNetworkDataNetwork() { - 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); -} - -deleteMobileNetworkDataNetwork().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 1cb19fac63e6..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 mobile network dataNetwork. - * - * @summary Gets information about the specified mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkGet.json - */ -async function getMobileNetworkDataNetwork() { - 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); -} - -getMobileNetworkDataNetwork().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 39a232e04186..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 dataNetworks in the mobile network. - * - * @summary Lists all dataNetworks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkListByMobileNetwork.json - */ -async function listMobileNetworkDataNetworksInAMobileNetwork() { - 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); -} - -listMobileNetworkDataNetworksInAMobileNetwork().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 7ef2a05cdc91..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 Update data network tags. - * - * @summary Update data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 8a8831989fc2..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-03-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 bda61884def2..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-03-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 64f63816955d..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-03-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 7bf2b4c99d3d..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-03-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 a2dc22244d72..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-03-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 b545b351fdf6..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 List sim ids under a mobile network. - * - * @summary List sim ids under a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimIdListByMobileNetwork.json - */ -async function listSimProfileIdsByNetwork() { - 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); -} - -listSimProfileIdsByNetwork().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 375abc5fac19..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 a mobile network update tags. - * - * @summary Updates a mobile network update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 86d34257bf72..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-03-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 c8cf080d2f7f..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": ">=12.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/packetCoreControlPlanesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesCreateOrUpdateSample.js deleted file mode 100644 index bbf5aff8e3d5..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/packetCoreControlPlanesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates a PacketCoreControlPlane. - * - * @summary Creates or updates a PacketCoreControlPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreControlPlaneCreate.json - */ -async function createPacketCoreControlPlane() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const packetCoreControlPlaneName = "TestPacketCoreCP"; - const parameters = { - controlPlaneAccessInterface: { name: "N2" }, - coreNetworkTechnology: "5GC", - customLocation: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation", - }, - location: "eastus", - mobileNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork", - }, - 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 5bc6a2438390..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-03-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 44c3fc35c509..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-03-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 92ca972e4539..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 packetCoreControlPlanes in a resource group. - * - * @summary Lists all the packetCoreControlPlanes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 9d851bf818b2..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 packetCoreControlPlanes in a subscription. - * - * @summary Lists all the packetCoreControlPlanes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 688efc100ae1..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 a PacketCoreControlPlane update tags. - * - * @summary Updates a PacketCoreControlPlane update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 62b99b628675..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 PacketCoreDataPlane. - * - * @summary Creates or updates a PacketCoreDataPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 6f6510e43d41..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-03-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 10350130bf16..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-03-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 608e2aa7851b..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 packetCoreDataPlanes associated with a packetCoreControlPlane. - * - * @summary Lists all the packetCoreDataPlanes associated with a packetCoreControlPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 c00787531216..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 a PacketCoreDataPlane update tags. - * - * @summary Updates a PacketCoreDataPlane update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 65e139dee3aa..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-03-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 d863e89ee4a2..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-03-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 87894cc74aef..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-03-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 07148dcaac0e..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-03-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 a80e649f75b4..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 Update service tags. - * - * @summary Update service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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/simPoliciesCreateOrUpdateSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simPoliciesCreateOrUpdateSample.js deleted file mode 100644 index eb95ebeddf39..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 SimPolicy. - * - * @summary Creates or updates a SimPolicy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 679afd2cbee2..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-03-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 978d8a60df70..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-03-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 fec1787d64f2..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 simPolicies in a mobile network. - * - * @summary Gets all the simPolicies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 fd5afa0ee8fa..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 Update sim policy tags. - * - * @summary Update sim policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 1de807f4edec..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsCreateOrUpdateSample.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if 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-03-01-preview/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simName = "testSim"; - const parameters = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - location: "testLocation", - mobileNetwork: { - id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork", - }, - 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, - 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 7efe417e66c2..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsDeleteSample.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. - * - * @summary Deletes the specified sim. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = "subid"; - const resourceGroupName = "testResourceGroupName"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait(resourceGroupName, 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 4291cf2c8938..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsGetSample.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. - * - * @summary Gets information about the specified sim. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = "subid"; - const resourceGroupName = "testResourceGroupName"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get(resourceGroupName, simName); - console.log(result); -} - -getSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListByResourceGroupSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListByResourceGroupSample.js deleted file mode 100644 index f8598095048b..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListByResourceGroupSample.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 Sims in a subscription. - * - * @summary Gets all the Sims in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListByResourceGroup.json - */ -async function listSimsInAResourceGroup() { - 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.sims.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listSimsInAResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListBySubscriptionSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListBySubscriptionSample.js deleted file mode 100644 index db0cef2d47db..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsListBySubscriptionSample.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 sims in a subscription. - * - * @summary Gets all the sims in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListBySubscription.json - */ -async function listSimsInASubscription() { - const subscriptionId = "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listSimsInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsUpdateTagsSample.js b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsUpdateTagsSample.js deleted file mode 100644 index abc2b9ac476c..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/javascript/simsUpdateTagsSample.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 a sim update tags. - * - * @summary Updates a sim update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimUpdateTags.json - */ -async function updateSimTags() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simName = "testSim"; - const parameters = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.updateTags(resourceGroupName, simName, parameters); - console.log(result); -} - -updateSimTags().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 26449ff036e7..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-03-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 276f26841012..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-03-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 ed35f2d71192..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-03-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 7e89962a98ec..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-03-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 e31df91ee60c..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 a site update tags. - * - * @summary Updates a site update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 14cdd4bfead5..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 mobile network slice. - * - * @summary Creates or updates a mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceCreate.json - */ -async function createMobileNetworkSlice() { - 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); -} - -createMobileNetworkSlice().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 c783ea4ef616..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 mobile network slice. - * - * @summary Deletes the specified mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceDelete.json - */ -async function deleteMobileNetworkSlice() { - 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); -} - -deleteMobileNetworkSlice().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 24a0a6b1f444..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 mobile network slice. - * - * @summary Gets information about the specified mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceGet.json - */ -async function getMobileNetworkSlice() { - 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); -} - -getMobileNetworkSlice().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 76f33583c6ce..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-03-01-preview/examples/SliceListByMobileNetwork.json - */ -async function listMobileNetworkSlicesInAMobileNetwork() { - 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); -} - -listMobileNetworkSlicesInAMobileNetwork().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 5cdf0c058b5c..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 Update slice tags. - * - * @summary Update slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceUpdateTags.json - */ -async function updateMobileNetworkSliceTags() { - 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); -} - -updateMobileNetworkSliceTags().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 9e99d96f86b4..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,171 +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-03-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-03-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-03-01-preview/examples/AttachedDataNetworkGet.json | -| [attachedDataNetworksListByPacketCoreDataPlaneSample.ts][attacheddatanetworkslistbypacketcoredataplanesample] | Gets all the data networks associated with a packet core data plane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/AttachedDataNetworkListByPacketCoreDataPlane.json | -| [attachedDataNetworksUpdateTagsSample.ts][attacheddatanetworksupdatetagssample] | Updates an attached data network update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/AttachedDataNetworkUpdateTags.json | -| [dataNetworksCreateOrUpdateSample.ts][datanetworkscreateorupdatesample] | Creates or updates a mobile network dataNetwork. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkCreate.json | -| [dataNetworksDeleteSample.ts][datanetworksdeletesample] | Deletes the specified mobile network dataNetwork. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkDelete.json | -| [dataNetworksGetSample.ts][datanetworksgetsample] | Gets information about the specified mobile network dataNetwork. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkGet.json | -| [dataNetworksListByMobileNetworkSample.ts][datanetworkslistbymobilenetworksample] | Lists all dataNetworks in the mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkListByMobileNetwork.json | -| [dataNetworksUpdateTagsSample.ts][datanetworksupdatetagssample] | Update data network tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-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-03-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-03-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-03-01-preview/examples/MobileNetworkListBySubscription.json | -| [mobileNetworksListSimIdsSample.ts][mobilenetworkslistsimidssample] | List sim ids under a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimIdListByMobileNetwork.json | -| [mobileNetworksUpdateTagsSample.ts][mobilenetworksupdatetagssample] | Updates a mobile network update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/OperationList.json | -| [packetCoreControlPlanesCreateOrUpdateSample.ts][packetcorecontrolplanescreateorupdatesample] | Creates or updates a PacketCoreControlPlane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-01-preview/examples/PacketCoreControlPlaneGet.json | -| [packetCoreControlPlanesListByResourceGroupSample.ts][packetcorecontrolplaneslistbyresourcegroupsample] | Lists all the packetCoreControlPlanes in a resource group. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreControlPlaneListByResourceGroup.json | -| [packetCoreControlPlanesListBySubscriptionSample.ts][packetcorecontrolplaneslistbysubscriptionsample] | Lists all the packetCoreControlPlanes in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreControlPlaneListBySubscription.json | -| [packetCoreControlPlanesUpdateTagsSample.ts][packetcorecontrolplanesupdatetagssample] | Updates a PacketCoreControlPlane update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreControlPlaneUpdateTags.json | -| [packetCoreDataPlanesCreateOrUpdateSample.ts][packetcoredataplanescreateorupdatesample] | Creates or updates a PacketCoreDataPlane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-01-preview/examples/PacketCoreDataPlaneGet.json | -| [packetCoreDataPlanesListByPacketCoreControlPlaneSample.ts][packetcoredataplaneslistbypacketcorecontrolplanesample] | Lists all the packetCoreDataPlanes associated with a packetCoreControlPlane. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json | -| [packetCoreDataPlanesUpdateTagsSample.ts][packetcoredataplanesupdatetagssample] | Updates a PacketCoreDataPlane update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/ServiceCreate.json | -| [servicesDeleteSample.ts][servicesdeletesample] | Deletes the specified service. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-01-preview/examples/ServiceListByMobileNetwork.json | -| [servicesUpdateTagsSample.ts][servicesupdatetagssample] | Update service tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/ServiceUpdateTags.json | -| [simPoliciesCreateOrUpdateSample.ts][simpoliciescreateorupdatesample] | Creates or updates a SimPolicy. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-01-preview/examples/SimPolicyGet.json | -| [simPoliciesListByMobileNetworkSample.ts][simpolicieslistbymobilenetworksample] | Gets all the simPolicies in a mobile network. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimPolicyListByMobileNetwork.json | -| [simPoliciesUpdateTagsSample.ts][simpoliciesupdatetagssample] | Update sim policy tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/SimCreate.json | -| [simsDeleteSample.ts][simsdeletesample] | Deletes the specified sim. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/SimGet.json | -| [simsListByResourceGroupSample.ts][simslistbyresourcegroupsample] | Gets all the Sims in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListByResourceGroup.json | -| [simsListBySubscriptionSample.ts][simslistbysubscriptionsample] | Gets all the sims in a subscription. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListBySubscription.json | -| [simsUpdateTagsSample.ts][simsupdatetagssample] | Updates a sim update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimUpdateTags.json | -| [sitesCreateOrUpdateSample.ts][sitescreateorupdatesample] | Creates or updates a mobile network site. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-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-03-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-03-01-preview/examples/SiteListByMobileNetwork.json | -| [sitesUpdateTagsSample.ts][sitesupdatetagssample] | Updates a site update tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SiteUpdateTags.json | -| [slicesCreateOrUpdateSample.ts][slicescreateorupdatesample] | Creates or updates a mobile network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceCreate.json | -| [slicesDeleteSample.ts][slicesdeletesample] | Deletes the specified mobile network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceDelete.json | -| [slicesGetSample.ts][slicesgetsample] | Gets information about the specified mobile network slice. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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-03-01-preview/examples/SliceListByMobileNetwork.json | -| [slicesUpdateTagsSample.ts][slicesupdatetagssample] | Update slice tags. x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceUpdateTags.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/). - -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 -[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 -[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 -[simslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListByResourceGroupSample.ts -[simslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListBySubscriptionSample.ts -[simsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsUpdateTagsSample.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 fc2d1d539ec1..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": ">=12.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": "^12.0.0", - "typescript": "~4.4.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 b649e7d2fcda..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/attachedDataNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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-03-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 = { - location: "eastus", - naptConfiguration: { - enabled: "Enabled", - pinholeLimits: 65536, - pinholeTimeouts: { icmp: 60, tcp: 7440, udp: 300 }, - portRange: { maxPort: 65535, 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 d00ff5e783f2..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-03-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 f586f81676b7..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-03-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 bd726216e8bc..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 data networks associated with a packet core data plane. - * - * @summary Gets all the data networks associated with a packet core data plane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 cdd783059026..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 update tags. - * - * @summary Updates an attached data network update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 c2b1e06a0d33..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 mobile network dataNetwork. - * - * @summary Creates or updates a mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkCreate.json - */ -async function createMobileNetworkDataNetwork() { - 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); -} - -createMobileNetworkDataNetwork().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 e276a41c6447..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 mobile network dataNetwork. - * - * @summary Deletes the specified mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkDelete.json - */ -async function deleteMobileNetworkDataNetwork() { - 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); -} - -deleteMobileNetworkDataNetwork().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 27e4c1edc6a3..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 mobile network dataNetwork. - * - * @summary Gets information about the specified mobile network dataNetwork. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkGet.json - */ -async function getMobileNetworkDataNetwork() { - 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); -} - -getMobileNetworkDataNetwork().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 a1d571e01bf6..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 dataNetworks in the mobile network. - * - * @summary Lists all dataNetworks in the mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/DataNetworkListByMobileNetwork.json - */ -async function listMobileNetworkDataNetworksInAMobileNetwork() { - 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); -} - -listMobileNetworkDataNetworksInAMobileNetwork().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 4c7f5c652e73..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 Update data network tags. - * - * @summary Update data network tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 62c2d80564dd..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-03-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 5b74c57cadcd..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-03-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 3070c3d2445b..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-03-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 82055f8ca035..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-03-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 ff2a7364b78d..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-03-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 36e9c53fedc6..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 List sim ids under a mobile network. - * - * @summary List sim ids under a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimIdListByMobileNetwork.json - */ -async function listSimProfileIdsByNetwork() { - 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); -} - -listSimProfileIdsByNetwork().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 caccc0515d61..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 a mobile network update tags. - * - * @summary Updates a mobile network update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 1c1ffc3a4094..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-03-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/packetCoreControlPlanesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts deleted file mode 100644 index d679044f1456..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/packetCoreControlPlanesCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PacketCoreControlPlane, - MobileNetworkManagementClient -} from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a PacketCoreControlPlane. - * - * @summary Creates or updates a PacketCoreControlPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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", - customLocation: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation" - }, - location: "eastus", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - }, - 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 d6d3b88e8c31..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-03-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 d83ff52d5021..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-03-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 e766082206f8..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 packetCoreControlPlanes in a resource group. - * - * @summary Lists all the packetCoreControlPlanes in a resource group. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 a15caf51fc69..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 packetCoreControlPlanes in a subscription. - * - * @summary Lists all the packetCoreControlPlanes in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 0f919bd85f77..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 a PacketCoreControlPlane update tags. - * - * @summary Updates a PacketCoreControlPlane update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 3fd3004603f4..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 PacketCoreDataPlane. - * - * @summary Creates or updates a PacketCoreDataPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 57d855a2d4c1..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-03-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 ad3102d47783..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-03-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 705ed074caf5..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 packetCoreDataPlanes associated with a packetCoreControlPlane. - * - * @summary Lists all the packetCoreDataPlanes associated with a packetCoreControlPlane. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 4aa425aec5e1..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 a PacketCoreDataPlane update tags. - * - * @summary Updates a PacketCoreDataPlane update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 0c24833f6cc7..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-03-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 d21d38be2166..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-03-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 549c700f8a1a..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-03-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 0cb8cc49feaa..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-03-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 0a2fd0f69328..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 Update service tags. - * - * @summary Update service tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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/simPoliciesCreateOrUpdateSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simPoliciesCreateOrUpdateSample.ts deleted file mode 100644 index b000a31713e6..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 SimPolicy. - * - * @summary Creates or updates a SimPolicy. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 68810f261c4d..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-03-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 ad97e3537b0c..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-03-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 0910ce98cdb4..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 simPolicies in a mobile network. - * - * @summary Gets all the simPolicies in a mobile network. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 5b804d50b4e9..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 Update sim policy tags. - * - * @summary Update sim policy tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 33322818adfe..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * 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-03-01-preview/examples/SimCreate.json - */ -async function createSim() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simName = "testSim"; - const parameters: Sim = { - authenticationKey: "00000000000000000000000000000000", - deviceType: "Video camera", - integratedCircuitCardIdentifier: "8900000000000000000", - internationalMobileSubscriberIdentity: "00000", - location: "testLocation", - mobileNetwork: { - id: - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork" - }, - 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, - 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 33b03f3f2a27..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsDeleteSample.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. - * - * @summary Deletes the specified sim. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimDelete.json - */ -async function deleteSim() { - const subscriptionId = "subid"; - const resourceGroupName = "testResourceGroupName"; - const simName = "testSim"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.beginDeleteAndWait( - resourceGroupName, - 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 ab22189e47a6..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsGetSample.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. - * - * @summary Gets information about the specified sim. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimGet.json - */ -async function getSim() { - const subscriptionId = "subid"; - const resourceGroupName = "testResourceGroupName"; - const simName = "testSimName"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.get(resourceGroupName, simName); - console.log(result); -} - -getSim().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListByResourceGroupSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListByResourceGroupSample.ts deleted file mode 100644 index 775a8c78eaa7..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListByResourceGroupSample.ts +++ /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. -import { MobileNetworkManagementClient } from "@azure/arm-mobilenetwork"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Gets all the Sims in a subscription. - * - * @summary Gets all the Sims in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListByResourceGroup.json - */ -async function listSimsInAResourceGroup() { - 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.sims.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listSimsInAResourceGroup().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListBySubscriptionSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListBySubscriptionSample.ts deleted file mode 100644 index cbfb76d10e09..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsListBySubscriptionSample.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 sims in a subscription. - * - * @summary Gets all the sims in a subscription. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimListBySubscription.json - */ -async function listSimsInASubscription() { - const subscriptionId = "subid"; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sims.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listSimsInASubscription().catch(console.error); diff --git a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsUpdateTagsSample.ts b/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsUpdateTagsSample.ts deleted file mode 100644 index 41f3924b789f..000000000000 --- a/sdk/mobilenetwork/arm-mobilenetwork/samples/v1-beta/typescript/src/simsUpdateTagsSample.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 a sim update tags. - * - * @summary Updates a sim update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SimUpdateTags.json - */ -async function updateSimTags() { - const subscriptionId = "subid"; - const resourceGroupName = "rg1"; - const simName = "testSim"; - const parameters: TagsObject = { tags: { tag1: "value1", tag2: "value2" } }; - const credential = new DefaultAzureCredential(); - const client = new MobileNetworkManagementClient(credential, subscriptionId); - const result = await client.sims.updateTags( - resourceGroupName, - simName, - parameters - ); - console.log(result); -} - -updateSimTags().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 499fe78d64cb..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-03-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 a43c60718394..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-03-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 7a2e3c9deb61..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-03-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 cad8963df0c3..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-03-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 416193363d0b..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 a site update tags. - * - * @summary Updates a site update tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-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 c87a2a545529..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 mobile network slice. - * - * @summary Creates or updates a mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceCreate.json - */ -async function createMobileNetworkSlice() { - 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); -} - -createMobileNetworkSlice().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 c8dc7f3c8ec7..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 mobile network slice. - * - * @summary Deletes the specified mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceDelete.json - */ -async function deleteMobileNetworkSlice() { - 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); -} - -deleteMobileNetworkSlice().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 d977f3fbca3f..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 mobile network slice. - * - * @summary Gets information about the specified mobile network slice. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceGet.json - */ -async function getMobileNetworkSlice() { - 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); -} - -getMobileNetworkSlice().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 63117a8f8664..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-03-01-preview/examples/SliceListByMobileNetwork.json - */ -async function listMobileNetworkSlicesInAMobileNetwork() { - 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); -} - -listMobileNetworkSlicesInAMobileNetwork().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 f1a2b1ca8d3b..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 Update slice tags. - * - * @summary Update slice tags. - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-03-01-preview/examples/SliceUpdateTags.json - */ -async function updateMobileNetworkSliceTags() { - 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); -} - -updateMobileNetworkSliceTags().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/mobileNetworkManagementClient.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts index 828765bf64ad..f8d6e3aad478 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/mobileNetworkManagementClient.ts @@ -7,15 +7,23 @@ */ import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { AttachedDataNetworksImpl, DataNetworksImpl, MobileNetworksImpl, SitesImpl, + SimGroupsImpl, SimsImpl, OperationsImpl, PacketCoreControlPlanesImpl, + PacketCoreControlPlaneVersionsImpl, PacketCoreDataPlanesImpl, ServicesImpl, SimPoliciesImpl, @@ -26,9 +34,11 @@ import { DataNetworks, MobileNetworks, Sites, + SimGroups, Sims, Operations, PacketCoreControlPlanes, + PacketCoreControlPlaneVersions, PacketCoreDataPlanes, Services, SimPolicies, @@ -68,7 +78,7 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mobilenetwork/1.0.0-beta.2`; + const packageDetails = `azsdk-js-arm-mobilenetwork/1.0.0-beta.3`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -87,32 +97,90 @@ export class MobileNetworkManagementClient extends coreClient.ServiceClient { options.endpoint ?? options.baseUri ?? "https://management.azure.com" }; super(optionsWithDefaults); + + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-03-01-preview"; + this.apiVersion = options.apiVersion || "2022-04-01-preview"; 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.packetCoreControlPlaneVersions = new PacketCoreControlPlaneVersionsImpl( + this + ); this.packetCoreDataPlanes = new PacketCoreDataPlanesImpl(this); this.services = new ServicesImpl(this); this.simPolicies = new SimPoliciesImpl(this); this.slices = new SlicesImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } attachedDataNetworks: AttachedDataNetworks; dataNetworks: DataNetworks; mobileNetworks: MobileNetworks; sites: Sites; + simGroups: SimGroups; sims: Sims; operations: Operations; packetCoreControlPlanes: PacketCoreControlPlanes; + packetCoreControlPlaneVersions: PacketCoreControlPlaneVersions; packetCoreDataPlanes: PacketCoreDataPlanes; services: Services; simPolicies: SimPolicies; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts index 225849346a6f..42a4795939f0 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/index.ts @@ -59,8 +59,8 @@ export interface ErrorAdditionalInfo { /** Interface properties */ export interface InterfaceProperties { - /** The logical name for this interface. This should match one of the interfaces configured on your Azure Stack Edge machine. */ - name: string; + /** The logical name for this interface. This should match one of the interfaces configured on your Azure Stack Edge device. */ + name?: string; /** The IPv4 address. */ ipv4Address?: string; /** The IPv4 subnet. */ @@ -69,18 +69,19 @@ export interface InterfaceProperties { ipv4Gateway?: string; } -/** The Network Address and Port Translation settings to use for the attached data network. */ +/** The network address and port translation settings to use for the attached data network. */ export interface NaptConfiguration { - /** Whether NAPT is enabled for connections to this attachedDataNetwork. */ + /** Whether NAPT is enabled for connections to this attached data network. */ enabled?: NaptEnabled; /** * Range of port numbers to use as translated ports on each translated address. - * If not specified and NAPT is enabled, this range defaults to 1,024 - 65,535. (Ports under 1,024 should not be used because these are special purpose ports reserved by IANA.) + * If not specified and NAPT is enabled, this range defaults to 1,024 - 49,999. + * (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. */ portReuseHoldTime?: PortReuseHoldTimes; - /** Maximum number of UDP and TCP pinholes that can be open simultaneously on the core interface. */ + /** 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; /** Expiry times of inactive NAPT pinholes, in seconds. All timers must be at least 1 second. */ pinholeTimeouts?: PinholeTimeouts; @@ -88,7 +89,8 @@ export interface NaptConfiguration { /** * Range of port numbers to use as translated ports on each translated address. - * If not specified and NAPT is enabled, this range defaults to 1,024 - 65,535. (Ports under 1,024 should not be used because these are special purpose ports reserved by IANA.) + * If not specified and NAPT is enabled, this range defaults to 1,024 - 49,999. + * (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.) */ export interface PortRange { /** The minimum port number */ @@ -107,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 per RFC 5382 section 5. */ + /** Pinhole timeout for TCP pinholes in seconds. Default for TCP is 2 hours 4 minutes, as per RFC 5382 section 5. */ tcp?: number; - /** Pinhole timeout for UDP pinholes in seconds. Default for UDP is 5 minutes per RFC 4787 section 4.3. */ + /** Pinhole timeout for UDP pinholes in seconds. Default for UDP is 5 minutes, as per RFC 4787 section 4.3. */ udp?: number; - /** Pinhole timeout for ICMP pinholes in seconds. Default for ICMP Echo is 60 seconds per RFC 5508 section 3.2. */ + /** Pinhole timeout for ICMP pinholes in seconds. Default for ICMP Echo is 60 seconds, as per RFC 5508 section 3.2. */ icmp?: number; } @@ -174,7 +176,7 @@ export interface AttachedDataNetworkListResult { /** Response for data network API service call. */ export interface DataNetworkListResult { - /** A list of data networks in a resource group. */ + /** A list of data networks. */ value?: DataNetwork[]; /** * The URL to get the next set of results. @@ -183,11 +185,11 @@ export interface DataNetworkListResult { readonly nextLink?: string; } -/** Public Land Mobile Network (PLMN) ID. */ +/** Public land mobile network (PLMN) ID. */ export interface PlmnId { - /** Mobile Country Code (MCC). */ + /** Mobile country code (MCC). */ mcc: string; - /** Mobile Network Code (MNC). */ + /** Mobile network code (MNC). */ mnc: string; } @@ -202,9 +204,9 @@ export interface MobileNetworkListResult { readonly nextLink?: string; } -/** Response for list sim ids API service call. */ +/** Response for list SIM IDs API service call. */ export interface SimIdListResult { - /** A list of sim profile ids in a resource group. */ + /** A list of SIM IDs. */ value?: SubResource[]; /** * The URL to get the next set of results. @@ -221,7 +223,7 @@ export interface SubResource { /** Response for sites API service call. */ export interface SiteListResult { - /** A list of sites in a resource group. */ + /** A list of sites in a mobile network. */ value?: Site[]; /** * The URL to get the next set of results. @@ -230,49 +232,98 @@ export interface SiteListResult { readonly nextLink?: string; } -/** Reference to a Mobile Network resource. */ +/** 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. */ + /** Mobile network resource ID. */ id: string; } -/** Reference to a SIM Policy resource. */ +/** 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. */ + /** SIM policy resource ID. */ id: string; } -/** Static IP configuration for a sim, scoped to a particular attached data network and slice. */ +/** 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 attachedDataNetwork and slice defines the network scope of the IP address. */ + /** 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 attachedDataNetwork and slice defines the network scope of the IP address. */ + /** 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. */ + /** The static IP configuration for the SIM to use at the defined network scope. */ staticIp?: SimStaticIpPropertiesStaticIp; } -/** Reference to an Attached Data Network resource. */ +/** Reference to an attached data network resource. */ export interface AttachedDataNetworkResourceId { - /** Attached Data Network resource ID. */ + /** Attached data network resource ID. */ id: string; } -/** Reference to a Slice resource. */ +/** 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. */ +/** 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 attachedDataNetwork. */ + /** 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. */ +/** Response for list SIMs API service call. */ export interface SimListResult { - /** A list of Sims in a resource group. */ + /** A list of SIMs in a resource group. */ value?: Sim[]; /** * The URL to get the next set of results. @@ -323,12 +374,48 @@ export interface OperationDisplay { description?: string; } -/** Reference to an Azure ARC custom location resource. */ +/** 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. */ + azureStackEdgeDevice?: AzureStackEdgeDeviceResourceId; + /** 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. */ +export interface AzureStackEdgeDeviceResourceId { + /** Azure Stack Edge device resource ID. */ + id: string; +} + +/** Reference to an Azure Arc custom location resource. */ +export interface ConnectedClusterResourceId { + /** Azure Arc connected cluster resource ID. */ + id: string; +} + +/** Reference to an Azure Arc custom location resource. */ export interface CustomLocationResourceId { - /** Azure ARC custom location resource ID. */ + /** Azure Arc custom location resource ID. */ id: string; } +/** The kubernetes ingress configuration to control access to packet core diagnostics over local APIs. */ +export interface LocalDiagnosticsAccessConfiguration { + /** The HTTPS server TLS certificate used to secure local access to diagnostics. */ + httpsServerCertificate?: KeyVaultCertificate; +} + +/** An Azure key vault certificate. */ +export interface KeyVaultCertificate { + /** The certificate URL, unversioned. For example: https://contosovault.vault.azure.net/certificates/ingress. */ + certificateUrl?: string; +} + /** Response for packet core control planes API service call. */ export interface PacketCoreControlPlaneListResult { /** A list of packet core control planes in a resource group. */ @@ -340,6 +427,17 @@ export interface PacketCoreControlPlaneListResult { readonly nextLink?: string; } +/** Response for packet core control plane version API service call. */ +export interface PacketCoreControlPlaneVersionListResult { + /** A list of supported packet core control plane versions. */ + value?: PacketCoreControlPlaneVersion[]; + /** + * 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; +} + /** Response for packet core data planes API service call. */ export interface PacketCoreDataPlaneListResult { /** A list of packet core data planes in a resource group. */ @@ -353,19 +451,19 @@ export interface PacketCoreDataPlaneListResult { /** QoS policy */ export interface QosPolicy { - /** QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This must not be a standardized 5QI value selecting a GBR (Guaranteed Bit Rate) QoS. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5Qi parameter, and table 5.7.4-1 for the definition of which are the GBR 5QI values. */ + /** QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition of which are the GBR 5QI values. */ fiveQi?: number; /** QoS Flow allocation and retention priority (ARP) level. Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` and `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then `5qi` is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ allocationAndRetentionPriorityLevel?: number; - /** QoS Flow preemption capability. The Preemption Capability of a QoS Flow controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ + /** QoS Flow preemption capability. The preemption capability of a QoS Flow controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ preemptionCapability?: PreemptionCapability; - /** QoS Flow preemption vulnerability. The Preemption Vulnerability of a QoS Flow controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ + /** QoS Flow preemption vulnerability. The preemption vulnerability of a QoS Flow controls whether it can be preempted by a QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ preemptionVulnerability?: PreemptionVulnerability; - /** The Maximum Bit Rate (MBR) for all service data flows that use this PCC Rule or Service. */ + /** The maximum bit rate (MBR) for all service data flows that use this data flow policy rule or service. */ maximumBitRate: Ambr; } -/** Aggregate Maximum Bit Rate. */ +/** Aggregate maximum bit rate. */ export interface Ambr { /** Uplink bit rate. */ uplink: string; @@ -373,37 +471,37 @@ export interface Ambr { downlink: string; } -/** PCC rule configuration */ +/** Data flow policy rule configuration */ export interface PccRuleConfiguration { - /** The name of the rule. This must be unique within the parent Service. You must not use any of the following reserved strings - `default`, `requested` or `service`. */ + /** The name of the rule. This must be unique within the parent service. You must not use any of the following reserved strings - `default`, `requested` or `service`. */ ruleName: string; - /** A precedence value that is used to decide between PCC Rules when identifying the QoS values to use for a particular Sim. A lower value means a higher priority. This value should be unique among all PCC Rules configured in the Mobile Network. */ + /** A precedence value that is used to decide between data flow policy rules when identifying the QoS values to use for a particular SIM. A lower value means a higher priority. This value should be unique among all data flow policy rules configured in the mobile network. */ rulePrecedence: number; - /** The QoS policy to use for packets matching this rule. If this field is null then the Service will define the QoS settings. */ + /** The QoS policy to use for packets matching this rule. If this field is null then the parent service will define the QoS settings. */ ruleQosPolicy?: PccRuleQosPolicy; - /** Determines whether flows that match this PCC Rule are permitted. */ + /** Determines whether flows that match this data flow policy rule are permitted. */ trafficControl?: TrafficControlPermission; - /** The set of service data flow templates to use for this PCC Rule. */ + /** The set of data flow templates to use for this data flow policy rule. */ serviceDataFlowTemplates: ServiceDataFlowTemplate[]; } -/** Service data flow (SDF) template */ +/** Data flow template */ export interface ServiceDataFlowTemplate { - /** The name of the SDF template. This must be unique within the parent PccRuleConfiguration. You must not use any of the following reserved strings - `default`, `requested` or `service`. */ + /** The name of the data flow template. This must be unique within the parent data flow policy rule. You must not use any of the following reserved strings - `default`, `requested` or `service`. */ templateName: string; /** The direction of this flow. */ direction: SdfDirection; /** A list of the allowed protocol(s) for this flow. If you want this flow to be able to use any protocol within the internet protocol suite, use the value `ip`. If you only want to allow a selection of protocols, you must use the corresponding IANA Assigned Internet Protocol Number for each protocol, as described in https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml. For example, for UDP, you must use 17. If you use the value `ip` then you must leave the field `port` unspecified. */ protocol: string[]; - /** The remote IP address(es) to which UEs will connect for this flow. If you want to allow connections on any IP address, use the value `any`. Otherwise, you must provide each of the remote IP addresses to which Fusion Core will connect for this flow. You must provide each IP address in CIDR notation, including the netmask (for example, 192.0.2.54/24). */ + /** The remote IP address(es) to which UEs will connect for this flow. If you want to allow connections on any IP address, use the value `any`. Otherwise, you must provide each of the remote IP addresses to which the packet core instance will connect for this flow. You must provide each IP address in CIDR notation, including the netmask (for example, 192.0.2.54/24). */ remoteIpList: string[]; /** The port(s) to which UEs will connect for this flow. You can specify zero or more ports or port ranges. If you specify one or more ports or port ranges then you must specify a value other than `ip` in the `protocol` field. This is an optional setting. If you do not specify it then connections will be allowed on all ports. Port ranges must be specified as -. For example: [`8080`, `8082-8085`]. */ ports?: string[]; } -/** Response for Services API service call. */ +/** Response for services API service call. */ export interface ServiceListResult { - /** A list of Services. */ + /** A list of services. */ value?: Service[]; /** * The URL to get the next set of results. @@ -414,51 +512,51 @@ export interface ServiceListResult { /** 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 */ 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. */ 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[]; } -/** Reference to a Data Network resource. */ +/** Reference to a data network resource. */ export interface DataNetworkResourceId { - /** Data Network resource ID. */ + /** Data network resource ID. */ id: string; } -/** Settings controlling Data Network use */ +/** 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 */ dataNetwork: DataNetworkResourceId; /** Aggregate maximum bit rate across all non-GBR QoS flows of a given PDU session. See 3GPP TS23.501 section 5.7.2.6 for a full description of the Session-AMBR. */ sessionAmbr: Ambr; - /** Default QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This must not be a standardized 5QI value selecting a GBR (Guaranteed Bit Rate) QoS. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5Qi parameter, and table 5.7.4-1 for the definition of which are the GBR 5QI values. */ + /** Default QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition of which are the GBR 5QI values. */ fiveQi?: number; /** Default QoS Flow allocation and retention priority (ARP) level. Flows with higher priority preempt flows with lower priority, if the settings of `preemptionCapability` and `preemptionVulnerability` allow it. 1 is the highest level of priority. If this field is not specified then `5qi` is used to derive the ARP value. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ allocationAndRetentionPriorityLevel?: number; - /** Default QoS Flow preemption capability. The Preemption Capability of a QoS Flow controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ + /** Default QoS Flow preemption capability. The preemption capability of a QoS Flow controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ preemptionCapability?: PreemptionCapability; - /** Default QoS Flow preemption vulnerability. The Preemption Vulnerability of a QoS Flow controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ + /** Default QoS Flow preemption vulnerability. The preemption vulnerability of a QoS Flow controls whether it can be preempted by a QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. */ preemptionVulnerability?: PreemptionVulnerability; /** The default PDU session type, which is used if the UE does not request a specific session type. */ defaultSessionType?: PduSessionType; - /** Allowed session types in addition to the default session type. Must not duplicate the default session type. */ + /** 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. */ allowedServices: ServiceResourceId[]; } -/** Reference to a Service resource. */ +/** Reference to a service resource. */ export interface ServiceResourceId { /** Service resource ID. */ id: string; } -/** Response for SimPolicies API service call. */ +/** Response for SIM policies API service call. */ export interface SimPolicyListResult { - /** A list of SimPolicies. */ + /** A list of SIM policies. */ value?: SimPolicy[]; /** * The URL to get the next set of results. @@ -467,17 +565,17 @@ export interface SimPolicyListResult { readonly nextLink?: string; } -/** Single-Network Slice Selection Assistance Information (S-NSSAI). */ +/** Single-network slice selection assistance information (S-NSSAI). */ export interface Snssai { - /** Slice/Service Type (SST). */ + /** Slice/service type (SST). */ sst: number; - /** Slice Differentiator (SD). */ + /** Slice differentiator (SD). */ sd?: string; } -/** Response for attached data network API service call. */ +/** Response for network slice API service call. */ export interface SliceListResult { - /** A list of data networks in a resource group. */ + /** A list of network slices in a mobile network. */ value?: Slice[]; /** * The URL to get the next set of results. @@ -486,6 +584,12 @@ export interface SliceListResult { readonly nextLink?: string; } +/** Reference to a SIM group resource. */ +export interface SimGroupResourceId { + /** SIM group resource ID. */ + id: string; +} + /** Allocation and Retention Priority (ARP) parameters. */ export interface Arp { /** ARP priority level. */ @@ -504,9 +608,12 @@ export type TrackedResource = Resource & { location: string; }; -/** PCC rule QoS policy */ +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + +/** Data flow policy rule QoS policy */ export type PccRuleQosPolicy = QosPolicy & { - /** The Guaranteed Bit Rate (GBR) for all service data flows that use this PCC Rule. This is an optional setting. If you do not provide a value, there will be no GBR set for the PCC Rule that uses this QoS definition. */ + /** The guaranteed bit rate (GBR) for all service data flows that use this data flow policy rule. This is an optional setting. If you do not provide a value, there will be no GBR set for the data flow policy rule that uses this QoS definition. */ guaranteedBitRate?: Ambr; }; @@ -517,22 +624,25 @@ export type AttachedDataNetwork = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** The user plane interface on the data network. In 5G networks this is called as N6 interface whereas in 4G networks this is called as SGi interface. */ + /** 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 Network Address and Port Translation configuration. - * If not specified the attached data network uses a default NAPT configuration with NAPT enabled. + * 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. */ naptConfiguration?: NaptConfiguration; /** - * The user equipment address pool prefixes for the attached data network that are dynamically assigned by the core to UEs when they set up a PDU session. - * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both are defined then they must be the same size. + * The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will dynamically assign IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + * You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. If you define both, they must be of the same size. */ userEquipmentAddressPoolPrefix?: string[]; /** - * The user equipment address pool prefixes for the attached data network that are statically assigned by the core to UEs when they set up a PDU session. - * The mapping of static IP to sim is configured in staticIpConfiguration on the sim resource. - * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both are defined then they must be the same size. + * The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will assign static IP addresses to UEs. + * The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. The static IP address for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource. + * At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. If both are defined, they must be of the same size. */ userEquipmentStaticAddressPoolPrefix?: string[]; }; @@ -555,7 +665,7 @@ export type MobileNetwork = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** The unique public land mobile network identifier for the network. This is made up of the Mobile Country Code and Mobile Network Code, as defined in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used for testing and the values 999-99 and 999-999 can be used on internal private networks. */ + /** The unique public land mobile network identifier for the network. This is made up of the mobile country code and mobile network code, as defined in https://www.itu.int/rec/T-REC-E.212. The values 001-01 and 001-001 can be used for testing and the values 999-99 and 999-999 can be used on internal private networks. */ publicLandMobileNetworkIdentifier: PlmnId; /** * The mobile network resource identifier @@ -567,61 +677,54 @@ export type MobileNetwork = TrackedResource & { /** Site resource. */ export type Site = TrackedResource & { /** - * The provisioning state of the site resource. **TODO**: Confirm if this is needed + * 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. */ + /** An array of IDs of the network functions deployed on the site, maintained by the user. */ networkFunctions?: SubResource[]; }; -/** Sim resource. */ -export type Sim = TrackedResource & { +/** SIM group resource. */ +export type SimGroup = TrackedResource & { + /** The identity used to retrieve the encryption key from Azure key vault. */ + identity?: ManagedServiceIdentity; /** - * The provisioning state of the sim resource. + * 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; - /** - * The state of the sim resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly simState?: SimState; - /** The International Mobile Subscriber Identity (IMSI) for the sim. */ - internationalMobileSubscriberIdentity: string; - /** The Integrated Circuit Card ID (ICC Id) for the sim. */ - integratedCircuitCardIdentifier?: string; - /** The ki value for the sim. */ - authenticationKey?: string; - /** The Opc value for the sim. */ - operatorKeyCode?: string; - /** Mobile network that this sim belongs to */ + /** A key to encrypt the SIM data that belongs to this SIM group. */ + encryptionKey?: KeyVaultKey; + /** Mobile network that this SIM belongs to */ mobileNetwork?: MobileNetworkResourceId; - /** 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 simPolicy used by this 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 resource. */ export type PacketCoreControlPlane = TrackedResource & { + /** The identity used to retrieve the ingress certificate from Azure key vault. */ + identity?: ManagedServiceIdentity; /** * The provisioning state of the packet core control plane resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** Mobile network that this packet core control plane belongs to */ + /** Mobile network in which this packet core control plane is deployed. */ mobileNetwork: MobileNetworkResourceId; - /** Azure ARC custom location where the packet core is deployed. */ - customLocation?: CustomLocationResourceId; - /** The core network technology generation. */ + /** The platform where the packet core is deployed. */ + platform?: PlatformConfiguration; + /** The core network technology generation (5G core or EPC / 4G core). */ coreNetworkTechnology?: CoreNetworkType; /** The version of the packet core software that is deployed. */ version?: string; - /** The control plane interface on the access network. In 5G networks this is called as N2 interface whereas in 4G networks this is called as S1-MME interface. */ + /** 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 kubernetes ingress configuration to control access to packet core diagnostics over local APIs. */ + localDiagnosticsAccess?: LocalDiagnosticsAccessConfiguration; + /** Settings to allow interoperability with third party components e.g. RANs and UEs. */ + interopSettings?: Record; }; /** Packet core data plane resource. */ @@ -631,7 +734,7 @@ export type PacketCoreDataPlane = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** The user plane interface on the access network. In 5G networks this is called as N3 interface whereas in 4G networks this is called the S1-U interface. */ + /** The user plane interface on the access network. For 5G networks, this is the N3 interface. For 4G networks, this is the S1-U interface. */ userPlaneAccessInterface: InterfaceProperties; }; @@ -642,26 +745,26 @@ export type Service = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** A precedence value that is used to decide between services when identifying the QoS values to use for a particular Sim. A lower value means a higher priority. This value should be unique among all services configured in the Mobile Network. */ + /** A precedence value that is used to decide between services when identifying the QoS values to use for a particular SIM. A lower value means a higher priority. This value should be unique among all services configured in the mobile network. */ servicePrecedence: number; - /** The QoS policy to use for packets matching this service. This can be overridden for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this field is null then the UE's simPolicy will define the QoS settings. */ + /** The QoS policy to use for packets matching this service. This can be overridden for particular flows using the ruleQosPolicy field in a PccRuleConfiguration. If this field is null then the UE's SIM policy will define the QoS settings. */ serviceQosPolicy?: QosPolicy; - /** The set of PCC Rules that make up this service. */ + /** The set of data flow policy rules that make up this service. */ pccRules: PccRuleConfiguration[]; }; -/** Sim policy resource. */ +/** SIM policy resource. */ export type SimPolicy = TrackedResource & { /** - * The provisioning state of the sim policy resource. + * The provisioning state of the SIM policy resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; /** 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. */ defaultSlice: SliceResourceId; - /** RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an optional setting and by default is unspecified. */ + /** RAT/Frequency Selection Priority Index, defined in 3GPP TS 36.413. This is an optional setting and by default is unspecified. */ rfspIndex?: number; /** Interval for the UE periodic registration update procedure, in seconds. */ registrationTimer?: number; @@ -676,12 +779,53 @@ export type Slice = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** The S-NSSAI (single network slice selection assistance information). Unique at the scope of a MobileNetwork. */ + /** Single-network slice selection assistance information (S-NSSAI). Unique at the scope of a mobile network. */ snssai: Snssai; /** An optional description for this network slice. */ description?: string; }; +/** SIM resource. */ +export type Sim = ProxyResource & { + /** + * 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; + /** 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. */ + 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 type PacketCoreControlPlaneVersion = 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; + /** 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; +}; + /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { Unknown = "Unknown", @@ -746,13 +890,33 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + UserAssigned = "UserAssigned", + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" +} + +/** + * 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 + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** + */ +export type ManagedServiceIdentityType = 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. */ + /** The SIM is disabled because not all configuration required for enabling is present. */ Disabled = "Disabled", - /** The sim is enabled. */ + /** The SIM is enabled. */ Enabled = "Enabled", - /** The sim cannot be enabled because some of the associated configuration is invalid. */ + /** The SIM cannot be enabled because some of the associated configuration is invalid. */ Invalid = "Invalid" } @@ -761,12 +925,30 @@ export enum KnownSimState { * {@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. + * **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 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" +} + +/** + * 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 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". + */ +export type PlatformType = string; + /** Known values of {@link CoreNetworkType} that the service accepts. */ export enum KnownCoreNetworkType { /** 5G core */ @@ -785,6 +967,87 @@ export enum KnownCoreNetworkType { */ export type CoreNetworkType = 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" +} + +/** + * 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 + * **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 + */ +export type BillingSku = string; + +/** Known values of {@link VersionState} that the service accepts. */ +export enum KnownVersionState { + /** The state of this version is unknown. */ + Unknown = "Unknown", + /** This version is a preview and is not suitable for production use. */ + Preview = "Preview", + /** This version is currently being validated. */ + Validating = "Validating", + /** This version failed validation. */ + ValidationFailed = "ValidationFailed", + /** This version is active and suitable for production use. */ + Active = "Active", + /** This version is deprecated and is no longer supported. */ + Deprecated = "Deprecated" +} + +/** + * Defines values for VersionState. \ + * {@link KnownVersionState} can be used interchangeably with VersionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: The state of this version is unknown. \ + * **Preview**: This version is a preview and is not suitable for production use. \ + * **Validating**: This version is currently being validated. \ + * **ValidationFailed**: This version failed validation. \ + * **Active**: This version is active and suitable for production use. \ + * **Deprecated**: This version is deprecated and is no longer supported. + */ +export type VersionState = string; + +/** Known values of {@link RecommendedVersion} that the service accepts. */ +export enum KnownRecommendedVersion { + /** This is the recommended version to use for new packet core control plane deployments. */ + Recommended = "Recommended", + /** This is not the recommended version to use for new packet core control plane deployments. */ + NotRecommended = "NotRecommended" +} + +/** + * Defines values for RecommendedVersion. \ + * {@link KnownRecommendedVersion} can be used interchangeably with RecommendedVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Recommended**: This is the recommended version to use for new packet core control plane deployments. \ + * **NotRecommended**: This is not the recommended version to use for new packet core control plane deployments. + */ +export type RecommendedVersion = string; + /** Known values of {@link PreemptionCapability} that the service accepts. */ export enum KnownPreemptionCapability { /** Cannot preempt */ @@ -1097,7 +1360,8 @@ export interface SitesListByMobileNetworkNextOptionalParams export type SitesListByMobileNetworkNextResponse = SiteListResult; /** Optional parameters. */ -export interface SimsDeleteOptionalParams extends coreClient.OperationOptions { +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. */ @@ -1105,13 +1369,14 @@ export interface SimsDeleteOptionalParams extends coreClient.OperationOptions { } /** Optional parameters. */ -export interface SimsGetOptionalParams extends coreClient.OperationOptions {} +export interface SimGroupsGetOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SimsGetResponse = Sim; +export type SimGroupsGetResponse = SimGroup; /** Optional parameters. */ -export interface SimsCreateOrUpdateOptionalParams +export interface SimGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1120,42 +1385,82 @@ export interface SimsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type SimsCreateOrUpdateResponse = Sim; +export type SimGroupsCreateOrUpdateResponse = SimGroup; /** Optional parameters. */ -export interface SimsUpdateTagsOptionalParams +export interface SimGroupsUpdateTagsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the updateTags operation. */ -export type SimsUpdateTagsResponse = Sim; +export type SimGroupsUpdateTagsResponse = SimGroup; /** Optional parameters. */ -export interface SimsListBySubscriptionOptionalParams +export interface SimGroupsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscription operation. */ -export type SimsListBySubscriptionResponse = SimListResult; +export type SimGroupsListBySubscriptionResponse = SimGroupListResult; /** Optional parameters. */ -export interface SimsListByResourceGroupOptionalParams +export interface SimGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ -export type SimsListByResourceGroupResponse = SimListResult; +export type SimGroupsListByResourceGroupResponse = SimGroupListResult; /** Optional parameters. */ -export interface SimsListBySubscriptionNextOptionalParams +export interface SimGroupsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ -export type SimsListBySubscriptionNextResponse = SimListResult; +export type SimGroupsListBySubscriptionNextResponse = SimGroupListResult; /** Optional parameters. */ -export interface SimsListByResourceGroupNextOptionalParams +export interface SimGroupsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ -export type SimsListByResourceGroupNextResponse = SimListResult; +export type SimGroupsListByResourceGroupNextResponse = SimGroupListResult; + +/** 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 SimsListBySimGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySimGroup operation. */ +export type SimsListBySimGroupResponse = SimListResult; + +/** Optional parameters. */ +export interface SimsListBySimGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySimGroupNext operation. */ +export type SimsListBySimGroupNextResponse = SimListResult; /** Optional parameters. */ export interface OperationsListOptionalParams @@ -1234,6 +1539,27 @@ export interface PacketCoreControlPlanesListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type PacketCoreControlPlanesListByResourceGroupNextResponse = PacketCoreControlPlaneListResult; +/** Optional parameters. */ +export interface PacketCoreControlPlaneVersionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PacketCoreControlPlaneVersionsGetResponse = PacketCoreControlPlaneVersion; + +/** Optional parameters. */ +export interface PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PacketCoreControlPlaneVersionsListByResourceGroupResponse = PacketCoreControlPlaneVersionListResult; + +/** Optional parameters. */ +export interface PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PacketCoreControlPlaneVersionsListByResourceGroupNextResponse = PacketCoreControlPlaneVersionListResult; + /** Optional parameters. */ export interface PacketCoreDataPlanesDeleteOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts index 4c8bd2db0d9a..2376b0ffd3f8 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/mappers.ts @@ -111,7 +111,6 @@ export const InterfaceProperties: coreClient.CompositeMapper = { modelProperties: { name: { serializedName: "name", - required: true, type: { name: "String" } @@ -218,7 +217,7 @@ export const PortRange: coreClient.CompositeMapper = { } }, maxPort: { - defaultValue: 65535, + defaultValue: 49999, constraints: { InclusiveMaximum: 65535, InclusiveMinimum: 1024 @@ -267,7 +266,7 @@ export const PinholeTimeouts: coreClient.CompositeMapper = { className: "PinholeTimeouts", modelProperties: { tcp: { - defaultValue: 7440, + defaultValue: 180, constraints: { InclusiveMinimum: 1 }, @@ -277,7 +276,7 @@ export const PinholeTimeouts: coreClient.CompositeMapper = { } }, udp: { - defaultValue: 300, + defaultValue: 30, constraints: { InclusiveMinimum: 1 }, @@ -287,7 +286,7 @@ export const PinholeTimeouts: coreClient.CompositeMapper = { } }, icmp: { - defaultValue: 60, + defaultValue: 30, constraints: { InclusiveMinimum: 1 }, @@ -583,6 +582,21 @@ export const SiteListResult: coreClient.CompositeMapper = { } }; +export const KeyVaultKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyVaultKey", + modelProperties: { + keyUrl: { + serializedName: "keyUrl", + type: { + name: "String" + } + } + } + } +}; + export const MobileNetworkResourceId: coreClient.CompositeMapper = { type: { name: "Composite", @@ -604,6 +618,96 @@ export const MobileNetworkResourceId: coreClient.CompositeMapper = { } }; +export const ManagedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServiceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } + } + } + } +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "Uuid" + } + } + } + } +}; + +export const SimGroupListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimGroupListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SimGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const SimPolicyResourceId: coreClient.CompositeMapper = { type: { name: "Composite", @@ -836,6 +940,85 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; +export const PlatformConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PlatformConfiguration", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + azureStackEdgeDevice: { + serializedName: "azureStackEdgeDevice", + type: { + name: "Composite", + className: "AzureStackEdgeDeviceResourceId" + } + }, + connectedCluster: { + serializedName: "connectedCluster", + type: { + name: "Composite", + className: "ConnectedClusterResourceId" + } + }, + customLocation: { + serializedName: "customLocation", + type: { + name: "Composite", + className: "CustomLocationResourceId" + } + } + } + } +}; + +export const AzureStackEdgeDeviceResourceId: coreClient.CompositeMapper = { + type: { + name: "Composite", + 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]\\.[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", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedClusterResourceId: coreClient.CompositeMapper = { + type: { + name: "Composite", + 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]\\.[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", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const CustomLocationResourceId: coreClient.CompositeMapper = { type: { name: "Composite", @@ -857,6 +1040,37 @@ export const CustomLocationResourceId: coreClient.CompositeMapper = { } }; +export const LocalDiagnosticsAccessConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LocalDiagnosticsAccessConfiguration", + modelProperties: { + httpsServerCertificate: { + serializedName: "httpsServerCertificate", + type: { + name: "Composite", + className: "KeyVaultCertificate" + } + } + } + } +}; + +export const KeyVaultCertificate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyVaultCertificate", + modelProperties: { + certificateUrl: { + serializedName: "certificateUrl", + type: { + name: "String" + } + } + } + } +}; + export const PacketCoreControlPlaneListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -885,6 +1099,34 @@ export const PacketCoreControlPlaneListResult: coreClient.CompositeMapper = { } }; +export const PacketCoreControlPlaneVersionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PacketCoreControlPlaneVersionListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PacketCoreControlPlaneVersion" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const PacketCoreDataPlaneListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1430,6 +1672,27 @@ export const SliceListResult: coreClient.CompositeMapper = { } }; +export const SimGroupResourceId: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SimGroupResourceId", + 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][gG][rR][oO][uU][pP][sS]\\/[^/?#]+$" + ) + }, + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const Arp: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1488,6 +1751,16 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const PccRuleQosPolicy: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1525,6 +1798,25 @@ export const AttachedDataNetwork: coreClient.CompositeMapper = { className: "InterfaceProperties" } }, + dnsAddresses: { + constraints: { + UniqueItems: true + }, + serializedName: "properties.dnsAddresses", + type: { + name: "Sequence", + element: { + 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])$" + ) + }, + type: { + name: "String" + } + } + } + }, naptConfiguration: { serializedName: "properties.naptConfiguration", type: { @@ -1659,61 +1951,31 @@ export const Site: coreClient.CompositeMapper = { } }; -export const Sim: coreClient.CompositeMapper = { +export const SimGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Sim", + className: "SimGroup", modelProperties: { ...TrackedResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "ManagedServiceIdentity" } }, - simState: { - serializedName: "properties.simState", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, 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("^89[0-9]{17,18}$") - }, - 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", + encryptionKey: { + serializedName: "properties.encryptionKey", type: { - name: "String" + name: "Composite", + className: "KeyVaultKey" } }, mobileNetwork: { @@ -1722,35 +1984,6 @@ export const Sim: coreClient.CompositeMapper = { name: "Composite", className: "MobileNetworkResourceId" } - }, - 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" - } - } - } } } } @@ -1762,6 +1995,13 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { className: "PacketCoreControlPlane", modelProperties: { ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -1776,11 +2016,11 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { className: "MobileNetworkResourceId" } }, - customLocation: { - serializedName: "properties.customLocation", + platform: { + serializedName: "properties.platform", type: { name: "Composite", - className: "CustomLocationResourceId" + className: "PlatformConfiguration" } }, coreNetworkTechnology: { @@ -1801,6 +2041,27 @@ export const PacketCoreControlPlane: coreClient.CompositeMapper = { name: "Composite", className: "InterfaceProperties" } + }, + sku: { + serializedName: "properties.sku", + required: true, + type: { + name: "String" + } + }, + localDiagnosticsAccess: { + serializedName: "properties.localDiagnosticsAccess", + type: { + name: "Composite", + className: "LocalDiagnosticsAccessConfiguration" + } + }, + interopSettings: { + serializedName: "properties.interopSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } } } } @@ -1979,3 +2240,122 @@ export const Slice: coreClient.CompositeMapper = { } } }; + +export const Sim: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Sim", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + simState: { + serializedName: "properties.simState", + readOnly: true, + 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("^89[0-9]{17,18}$") + }, + 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: { + 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" + } + } + } + } + } + } +}; + +export const PacketCoreControlPlaneVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PacketCoreControlPlaneVersion", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + versionState: { + serializedName: "properties.versionState", + type: { + name: "String" + } + }, + recommendedVersion: { + serializedName: "properties.recommendedVersion", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts index 0f61f006d380..a51be483e616 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/models/parameters.ts @@ -17,6 +17,7 @@ import { DataNetwork as DataNetworkMapper, MobileNetwork as MobileNetworkMapper, Site as SiteMapper, + SimGroup as SimGroupMapper, Sim as SimMapper, PacketCoreControlPlane as PacketCoreControlPlaneMapper, PacketCoreDataPlane as PacketCoreDataPlaneMapper, @@ -128,7 +129,7 @@ export const attachedDataNetworkName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-03-01-preview", + defaultValue: "2022-04-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -233,6 +234,26 @@ export const parameters4: OperationParameter = { mapper: SiteMapper }; +export const simGroupName: OperationURLParameter = { + parameterPath: "simGroupName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_-]*$"), + MaxLength: 64 + }, + serializedName: "simGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters5: OperationParameter = { + parameterPath: "parameters", + mapper: SimGroupMapper +}; + export const simName: OperationURLParameter = { parameterPath: "simName", mapper: { @@ -248,17 +269,28 @@ export const simName: OperationURLParameter = { } }; -export const parameters5: OperationParameter = { +export const parameters6: OperationParameter = { parameterPath: "parameters", mapper: SimMapper }; -export const parameters6: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: PacketCoreControlPlaneMapper }; -export const parameters7: OperationParameter = { +export const versionName: OperationURLParameter = { + parameterPath: "versionName", + mapper: { + serializedName: "versionName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: PacketCoreDataPlaneMapper }; @@ -280,7 +312,7 @@ export const serviceName: OperationURLParameter = { } }; -export const parameters8: OperationParameter = { +export const parameters9: OperationParameter = { parameterPath: "parameters", mapper: ServiceMapper }; @@ -300,7 +332,7 @@ export const simPolicyName: OperationURLParameter = { } }; -export const parameters9: OperationParameter = { +export const parameters10: OperationParameter = { parameterPath: "parameters", mapper: SimPolicyMapper }; @@ -320,7 +352,7 @@ export const sliceName: OperationURLParameter = { } }; -export const parameters10: OperationParameter = { +export const parameters11: 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 d46323757a10..5339a5315992 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/attachedDataNetworks.ts @@ -44,7 +44,7 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { } /** - * Gets all the data networks associated with a packet core data plane. + * Gets all the attached data networks associated with a 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. @@ -360,7 +360,7 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { } /** - * Updates an attached data network update tags. + * Updates an attached data network tags. * @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. @@ -390,7 +390,7 @@ export class AttachedDataNetworksImpl implements AttachedDataNetworks { } /** - * Gets all the data networks associated with a packet core data plane. + * Gets all the attached data networks associated with a 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/operations/dataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts index bca4c4c6c414..ccbe624e4f7c 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/dataNetworks.ts @@ -44,7 +44,7 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Lists all dataNetworks in the mobile network. + * Lists all data networks in the 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. @@ -115,10 +115,10 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Deletes the specified mobile network dataNetwork. + * Deletes the specified data 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 mobile network dataNetwork. + * @param dataNetworkName The name of the data network. * @param options The options parameters. */ async beginDelete( @@ -181,10 +181,10 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Deletes the specified mobile network dataNetwork. + * Deletes the specified data 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 mobile network dataNetwork. + * @param dataNetworkName The name of the data network. * @param options The options parameters. */ async beginDeleteAndWait( @@ -203,10 +203,10 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Gets information about the specified mobile network dataNetwork. + * Gets information about the specified data 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 mobile network dataNetwork. + * @param dataNetworkName The name of the data network. * @param options The options parameters. */ get( @@ -222,11 +222,11 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Creates or updates a mobile network dataNetwork. + * Creates or updates a data 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 mobile network dataNetwork. - * @param parameters Parameters supplied to the create or update mobile network dataNetwork operation. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. * @param options The options parameters. */ async beginCreateOrUpdate( @@ -301,11 +301,11 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Creates or updates a mobile network dataNetwork. + * Creates or updates a data 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 mobile network dataNetwork. - * @param parameters Parameters supplied to the create or update mobile network dataNetwork operation. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( @@ -326,10 +326,10 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Update data network tags. + * Updates data network tags. * @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 mobile network dataNetwork. + * @param dataNetworkName The name of the data network. * @param parameters Parameters supplied to update data network tags. * @param options The options parameters. */ @@ -353,7 +353,7 @@ export class DataNetworksImpl implements DataNetworks { } /** - * Lists all dataNetworks in the mobile network. + * Lists all data networks in the 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. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts index 76d249544222..837e063c3d2a 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/index.ts @@ -10,9 +10,11 @@ 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 "./packetCoreControlPlaneVersions"; export * from "./packetCoreDataPlanes"; export * from "./services"; export * from "./simPolicies"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts index 58b2f81ca1fc..e2741d2d84e5 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/mobileNetworks.ts @@ -338,7 +338,7 @@ export class MobileNetworksImpl implements MobileNetworks { } /** - * Updates a mobile network update tags. + * Updates mobile network tags. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param parameters Parameters supplied to update mobile network tags. @@ -385,7 +385,7 @@ export class MobileNetworksImpl implements MobileNetworks { } /** - * List sim ids under a mobile network. + * 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. @@ -454,7 +454,7 @@ export class MobileNetworksImpl implements MobileNetworks { } /** - * List sim ids under a mobile network. + * 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. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts new file mode 100644 index 000000000000..103c903b89ee --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlaneVersions.ts @@ -0,0 +1,175 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PacketCoreControlPlaneVersions } 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 { + PacketCoreControlPlaneVersion, + PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams, + PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams, + PacketCoreControlPlaneVersionsGetOptionalParams, + PacketCoreControlPlaneVersionsGetResponse, + PacketCoreControlPlaneVersionsListByResourceGroupResponse, + PacketCoreControlPlaneVersionsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PacketCoreControlPlaneVersions operations. */ +export class PacketCoreControlPlaneVersionsImpl + implements PacketCoreControlPlaneVersions { + private readonly client: MobileNetworkManagementClient; + + /** + * Initialize a new instance of the class PacketCoreControlPlaneVersions class. + * @param client Reference to the service client + */ + constructor(client: MobileNetworkManagementClient) { + this.client = client; + } + + /** + * Lists all supported packet core control planes versions. + * @param options The options parameters. + */ + public listByResourceGroup( + options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(options); + } + }; + } + + private async *listByResourceGroupPagingPage( + options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage(options)) { + yield* page; + } + } + + /** + * Gets information about the specified packet core control plane version. + * @param versionName The name of the packet core control plane version. + * @param options The options parameters. + */ + get( + versionName: string, + options?: PacketCoreControlPlaneVersionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { versionName, options }, + getOperationSpec + ); + } + + /** + * Lists all supported packet core control planes versions. + * @param options The options parameters. + */ + private _listByResourceGroup( + options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + nextLink: string, + options?: PacketCoreControlPlaneVersionsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/{versionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCoreControlPlaneVersion + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.versionName], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCoreControlPlaneVersionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PacketCoreControlPlaneVersionListResult + }, + default: { + 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 91c006b70350..083f16306ae5 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreControlPlanes.ts @@ -48,7 +48,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { } /** - * Lists all the packetCoreControlPlanes in a subscription. + * Lists all the packet core control planes in a subscription. * @param options The options parameters. */ public listBySubscription( @@ -90,7 +90,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { } /** - * Lists all the packetCoreControlPlanes in a resource group. + * Lists all the packet core control planes in a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -243,7 +243,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { } /** - * Creates or updates a PacketCoreControlPlane. + * Creates or updates a packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. * @param parameters Parameters supplied to the create or update packet core control plane operation. @@ -314,7 +314,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { } /** - * Creates or updates a PacketCoreControlPlane. + * Creates or updates a packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. * @param parameters Parameters supplied to the create or update packet core control plane operation. @@ -336,10 +336,10 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { } /** - * Updates a PacketCoreControlPlane update tags. + * Updates packet core control planes tags. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to update PacketCoreControlPlane tags. + * @param parameters Parameters supplied to update packet core control plane tags. * @param options The options parameters. */ updateTags( @@ -355,7 +355,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { } /** - * Lists all the packetCoreControlPlanes in a subscription. + * Lists all the packet core control planes in a subscription. * @param options The options parameters. */ private _listBySubscription( @@ -368,7 +368,7 @@ export class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { } /** - * Lists all the packetCoreControlPlanes in a resource group. + * Lists all the packet core control planes in a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -483,7 +483,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts index 567178d478cc..e03c0aea4757 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/packetCoreDataPlanes.ts @@ -44,7 +44,7 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { } /** - * Lists all the packetCoreDataPlanes associated with a packetCoreControlPlane. + * Lists all the packet core data planes associated with a packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. * @param options The options parameters. @@ -232,7 +232,7 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { } /** - * Creates or updates a PacketCoreDataPlane. + * Creates or updates a 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. @@ -311,7 +311,7 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { } /** - * Creates or updates a PacketCoreDataPlane. + * Creates or updates a 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. @@ -336,11 +336,11 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { } /** - * Updates a PacketCoreDataPlane update tags. + * Updates packet core data planes tags. * @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. - * @param parameters Parameters supplied to update PacketCoreDataPlane tags. + * @param parameters Parameters supplied to update packet core data plane tags. * @param options The options parameters. */ updateTags( @@ -363,7 +363,7 @@ export class PacketCoreDataPlanesImpl implements PacketCoreDataPlanes { } /** - * Lists all the packetCoreDataPlanes associated with a packetCoreControlPlane. + * Lists all the packet core data planes associated with a packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. * @param options The options parameters. @@ -470,7 +470,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts index fb1fde965610..855440de8e20 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/services.ts @@ -225,7 +225,7 @@ export class ServicesImpl implements Services { } /** - * Creates or updates a Service. + * Creates or updates a service. * @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 +305,7 @@ export class ServicesImpl implements Services { } /** - * Creates or updates a Service. + * Creates or updates a service. * @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 - @@ -331,7 +331,7 @@ export class ServicesImpl implements Services { } /** - * Update service tags. + * Updates service tags. * @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 +465,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts new file mode 100644 index 000000000000..befb82aa2afa --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simGroups.ts @@ -0,0 +1,600 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimGroups } 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 { + SimGroup, + SimGroupsListBySubscriptionNextOptionalParams, + SimGroupsListBySubscriptionOptionalParams, + SimGroupsListByResourceGroupNextOptionalParams, + SimGroupsListByResourceGroupOptionalParams, + SimGroupsDeleteOptionalParams, + SimGroupsGetOptionalParams, + SimGroupsGetResponse, + SimGroupsCreateOrUpdateOptionalParams, + SimGroupsCreateOrUpdateResponse, + TagsObject, + SimGroupsUpdateTagsOptionalParams, + SimGroupsUpdateTagsResponse, + SimGroupsListBySubscriptionResponse, + SimGroupsListByResourceGroupResponse, + SimGroupsListBySubscriptionNextResponse, + SimGroupsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing SimGroups operations. */ +export class SimGroupsImpl implements SimGroups { + private readonly client: MobileNetworkManagementClient; + + /** + * Initialize a new instance of the class SimGroups class. + * @param client Reference to the service client + */ + constructor(client: MobileNetworkManagementClient) { + this.client = client; + } + + /** + * Gets all the SIM groups in a subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: SimGroupsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: SimGroupsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: SimGroupsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Gets all the SIM groups in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: SimGroupsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: SimGroupsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: SimGroupsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Deletes the specified SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + simGroupName: string, + options?: SimGroupsDeleteOptionalParams + ): Promise, void>> { + 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, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + simGroupName: string, + options?: SimGroupsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + simGroupName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets information about the specified SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + simGroupName: string, + options?: SimGroupsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, simGroupName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates 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 create or update SIM group operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + simGroupName: string, + parameters: SimGroup, + options?: SimGroupsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimGroupsCreateOrUpdateResponse + > + > { + 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 }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates 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 create or update SIM group operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimGroup, + options?: SimGroupsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + simGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates SIM group tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to update SIM group tags. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + simGroupName: string, + parameters: TagsObject, + options?: SimGroupsUpdateTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, simGroupName, parameters, options }, + updateTagsOperationSpec + ); + } + + /** + * Gets all the SIM groups in a subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: SimGroupsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Gets all the SIM groups in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: SimGroupsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: SimGroupsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: SimGroupsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SimGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SimGroup + }, + 201: { + bodyMapper: Mappers.SimGroup + }, + 202: { + bodyMapper: Mappers.SimGroup + }, + 204: { + bodyMapper: Mappers.SimGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SimGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.simGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/simGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SimGroupListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SimGroupListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SimGroupListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SimGroupListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts index 60d73d5fed3f..740efb4d03de 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/simPolicies.ts @@ -44,7 +44,7 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Gets all the simPolicies in a mobile network. + * Gets all the SIM policies 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. @@ -115,7 +115,7 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Deletes the specified sim policy. + * Deletes the specified SIM policy. * @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. @@ -181,7 +181,7 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Deletes the specified sim policy. + * Deletes the specified SIM policy. * @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. @@ -203,7 +203,7 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Gets information about the specified sim policy. + * Gets information about the specified SIM policy. * @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. @@ -222,11 +222,11 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Creates or updates a SimPolicy. + * Creates or updates a SIM policy. * @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. - * @param parameters Parameters supplied to the create or update sim policy operation. + * @param parameters Parameters supplied to the create or update SIM policy operation. * @param options The options parameters. */ async beginCreateOrUpdate( @@ -301,11 +301,11 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Creates or updates a SimPolicy. + * Creates or updates a SIM policy. * @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. - * @param parameters Parameters supplied to the create or update sim policy operation. + * @param parameters Parameters supplied to the create or update SIM policy operation. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( @@ -326,11 +326,11 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Update sim policy tags. + * Updates SIM policy tags. * @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. - * @param parameters Parameters supplied to update Sim Policy tags. + * @param parameters Parameters supplied to update SIM policy tags. * @param options The options parameters. */ updateTags( @@ -353,7 +353,7 @@ export class SimPoliciesImpl implements SimPolicies { } /** - * Gets all the simPolicies in a mobile network. + * Gets all the SIM policies 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. @@ -459,7 +459,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters9, + requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts index 677da9b751f2..d1c1974c7869 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sims.ts @@ -16,22 +16,15 @@ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { Sim, - SimsListBySubscriptionNextOptionalParams, - SimsListBySubscriptionOptionalParams, - SimsListByResourceGroupNextOptionalParams, - SimsListByResourceGroupOptionalParams, + SimsListBySimGroupNextOptionalParams, + SimsListBySimGroupOptionalParams, SimsDeleteOptionalParams, SimsGetOptionalParams, SimsGetResponse, SimsCreateOrUpdateOptionalParams, SimsCreateOrUpdateResponse, - TagsObject, - SimsUpdateTagsOptionalParams, - SimsUpdateTagsResponse, - SimsListBySubscriptionResponse, - SimsListByResourceGroupResponse, - SimsListBySubscriptionNextResponse, - SimsListByResourceGroupNextResponse + SimsListBySimGroupResponse, + SimsListBySimGroupNextResponse } from "../models"; /// @@ -48,57 +41,21 @@ export class SimsImpl implements Sims { } /** - * Gets all the sims in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: SimsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listBySubscriptionPagingPage(options); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: SimsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - let result = await this._listBySubscription(options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listBySubscriptionPagingAll( - options?: SimsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all the Sims in a subscription. + * Gets all the SIMs in 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 options The options parameters. */ - public listByResourceGroup( + public listBySimGroup( resourceGroupName: string, - options?: SimsListByResourceGroupOptionalParams + simGroupName: string, + options?: SimsListBySimGroupOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + const iter = this.listBySimGroupPagingAll( + resourceGroupName, + simGroupName, + options + ); return { next() { return iter.next(); @@ -107,21 +64,31 @@ export class SimsImpl implements Sims { return this; }, byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); + return this.listBySimGroupPagingPage( + resourceGroupName, + simGroupName, + options + ); } }; } - private async *listByResourceGroupPagingPage( + private async *listBySimGroupPagingPage( resourceGroupName: string, - options?: SimsListByResourceGroupOptionalParams + simGroupName: string, + options?: SimsListBySimGroupOptionalParams ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); + let result = await this._listBySimGroup( + resourceGroupName, + simGroupName, + options + ); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) { - result = await this._listByResourceGroupNext( + result = await this._listBySimGroupNext( resourceGroupName, + simGroupName, continuationToken, options ); @@ -130,12 +97,14 @@ export class SimsImpl implements Sims { } } - private async *listByResourceGroupPagingAll( + private async *listBySimGroupPagingAll( resourceGroupName: string, - options?: SimsListByResourceGroupOptionalParams + simGroupName: string, + options?: SimsListBySimGroupOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( + for await (const page of this.listBySimGroupPagingPage( resourceGroupName, + simGroupName, options )) { yield* page; @@ -143,13 +112,15 @@ export class SimsImpl implements Sims { } /** - * Deletes the specified sim. + * Deletes the specified SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. * @param options The options parameters. */ async beginDelete( resourceGroupName: string, + simGroupName: string, simName: string, options?: SimsDeleteOptionalParams ): Promise, void>> { @@ -194,7 +165,7 @@ export class SimsImpl implements Sims { const lro = new LroImpl( sendOperation, - { resourceGroupName, simName, options }, + { resourceGroupName, simGroupName, simName, options }, deleteOperationSpec ); const poller = new LroEngine(lro, { @@ -207,46 +178,57 @@ export class SimsImpl implements Sims { } /** - * Deletes the specified sim. + * Deletes the specified SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. * @param options The options parameters. */ async beginDeleteAndWait( resourceGroupName: string, + simGroupName: string, simName: string, options?: SimsDeleteOptionalParams ): Promise { - const poller = await this.beginDelete(resourceGroupName, simName, options); + const poller = await this.beginDelete( + resourceGroupName, + simGroupName, + simName, + options + ); return poller.pollUntilDone(); } /** - * Gets information about the specified sim. + * Gets information about the specified SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. * @param options The options parameters. */ get( resourceGroupName: string, + simGroupName: string, simName: string, options?: SimsGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, simName, options }, + { resourceGroupName, simGroupName, simName, options }, getOperationSpec ); } /** - * Creates or updates a Sim. + * Creates or updates a SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. - * @param parameters Parameters supplied to the create or update sim operation. + * @param parameters Parameters supplied to the create or update SIM operation. * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, + simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams @@ -297,7 +279,7 @@ export class SimsImpl implements Sims { const lro = new LroImpl( sendOperation, - { resourceGroupName, simName, parameters, options }, + { resourceGroupName, simGroupName, simName, parameters, options }, createOrUpdateOperationSpec ); const poller = new LroEngine(lro, { @@ -310,20 +292,23 @@ export class SimsImpl implements Sims { } /** - * Creates or updates a Sim. + * Creates or updates a SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. - * @param parameters Parameters supplied to the create or update sim operation. + * @param parameters Parameters supplied to the create or update SIM operation. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, + simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, + simGroupName, simName, parameters, options @@ -332,81 +317,38 @@ export class SimsImpl implements Sims { } /** - * Updates a sim update tags. + * Gets all the SIMs in a SIM group. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simName The name of the SIM. - * @param parameters Parameters supplied to update sim tags. + * @param simGroupName The name of the SIM Group. * @param options The options parameters. */ - updateTags( + private _listBySimGroup( resourceGroupName: string, - simName: string, - parameters: TagsObject, - options?: SimsUpdateTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, simName, parameters, options }, - updateTagsOperationSpec - ); - } - - /** - * Gets all the sims in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: SimsListBySubscriptionOptionalParams - ): Promise { + simGroupName: string, + options?: SimsListBySimGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec + { resourceGroupName, simGroupName, options }, + listBySimGroupOperationSpec ); } /** - * Gets all the Sims in a subscription. + * ListBySimGroupNext * @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 options The options parameters. */ - private _listByResourceGroup( + private _listBySimGroupNext( resourceGroupName: string, - options?: SimsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( + simGroupName: string, nextLink: string, - options?: SimsListBySubscriptionNextOptionalParams - ): Promise { + options?: SimsListBySimGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: SimsListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + { resourceGroupName, simGroupName, nextLink, options }, + listBySimGroupNextOperationSpec ); } } @@ -415,7 +357,7 @@ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/sims/{simName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}", httpMethod: "DELETE", responses: { 200: {}, @@ -431,6 +373,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.simGroupName, Parameters.simName ], headerParameters: [Parameters.accept], @@ -438,7 +381,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/sims/{simName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}", httpMethod: "GET", responses: { 200: { @@ -453,6 +396,7 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.simGroupName, Parameters.simName ], headerParameters: [Parameters.accept], @@ -460,7 +404,7 @@ const getOperationSpec: coreClient.OperationSpec = { }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/sims/{simName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}", httpMethod: "PUT", responses: { 200: { @@ -479,62 +423,22 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.simName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/sims/{simName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Sim - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters1, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.simGroupName, Parameters.simName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { +const listBySimGroupOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/sims", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SimListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/sims", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims", httpMethod: "GET", responses: { 200: { @@ -548,32 +452,13 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SimListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink + Parameters.resourceGroupName, + Parameters.simGroupName ], headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { +const listBySimGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -589,7 +474,8 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.nextLink + Parameters.nextLink, + Parameters.simGroupName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts index e8f0aa5f1b53..8725698a006b 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/sites.ts @@ -320,7 +320,7 @@ export class SitesImpl implements Sites { } /** - * Updates a site update tags. + * Updates site tags. * @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/operations/slices.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts index 95cc3ede35b0..b603ee003b28 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operations/slices.ts @@ -115,10 +115,10 @@ export class SlicesImpl implements Slices { } /** - * Deletes the specified mobile network slice. + * Deletes the specified network slice. * @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 mobile network slice. + * @param sliceName The name of the network slice. * @param options The options parameters. */ async beginDelete( @@ -181,10 +181,10 @@ export class SlicesImpl implements Slices { } /** - * Deletes the specified mobile network slice. + * Deletes the specified network slice. * @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 mobile network slice. + * @param sliceName The name of the network slice. * @param options The options parameters. */ async beginDeleteAndWait( @@ -203,10 +203,10 @@ export class SlicesImpl implements Slices { } /** - * Gets information about the specified mobile network slice. + * Gets information about the specified network slice. * @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 mobile network slice. + * @param sliceName The name of the network slice. * @param options The options parameters. */ get( @@ -222,11 +222,11 @@ export class SlicesImpl implements Slices { } /** - * Creates or updates a mobile network slice. + * Creates or updates a network slice. * @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 mobile network slice. - * @param parameters Parameters supplied to the create or update mobile network slice operation. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. * @param options The options parameters. */ async beginCreateOrUpdate( @@ -295,11 +295,11 @@ export class SlicesImpl implements Slices { } /** - * Creates or updates a mobile network slice. + * Creates or updates a network slice. * @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 mobile network slice. - * @param parameters Parameters supplied to the create or update mobile network slice operation. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( @@ -320,11 +320,11 @@ export class SlicesImpl implements Slices { } /** - * Update slice tags. + * Updates slice tags. * @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 mobile network slice. - * @param parameters Parameters supplied to update mobile network slice tags. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. * @param options The options parameters. */ updateTags( @@ -447,7 +447,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts index ea0454713bd6..72cb17ad35c4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/attachedDataNetworks.ts @@ -25,7 +25,7 @@ import { /** Interface representing a AttachedDataNetworks. */ export interface AttachedDataNetworks { /** - * Gets all the data networks associated with a packet core data plane. + * Gets all the attached data networks associated with a 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. @@ -122,7 +122,7 @@ export interface AttachedDataNetworks { options?: AttachedDataNetworksCreateOrUpdateOptionalParams ): Promise; /** - * Updates an attached data network update tags. + * Updates an attached data network tags. * @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 316640225175..7d486d6660d4 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/dataNetworks.ts @@ -25,7 +25,7 @@ import { /** Interface representing a DataNetworks. */ export interface DataNetworks { /** - * Lists all dataNetworks in the mobile network. + * Lists all data networks in the 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. @@ -36,10 +36,10 @@ export interface DataNetworks { options?: DataNetworksListByMobileNetworkOptionalParams ): PagedAsyncIterableIterator; /** - * Deletes the specified mobile network dataNetwork. + * Deletes the specified data 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 mobile network dataNetwork. + * @param dataNetworkName The name of the data network. * @param options The options parameters. */ beginDelete( @@ -49,10 +49,10 @@ export interface DataNetworks { options?: DataNetworksDeleteOptionalParams ): Promise, void>>; /** - * Deletes the specified mobile network dataNetwork. + * Deletes the specified data 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 mobile network dataNetwork. + * @param dataNetworkName The name of the data network. * @param options The options parameters. */ beginDeleteAndWait( @@ -62,10 +62,10 @@ export interface DataNetworks { options?: DataNetworksDeleteOptionalParams ): Promise; /** - * Gets information about the specified mobile network dataNetwork. + * Gets information about the specified data 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 mobile network dataNetwork. + * @param dataNetworkName The name of the data network. * @param options The options parameters. */ get( @@ -75,11 +75,11 @@ export interface DataNetworks { options?: DataNetworksGetOptionalParams ): Promise; /** - * Creates or updates a mobile network dataNetwork. + * Creates or updates a data 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 mobile network dataNetwork. - * @param parameters Parameters supplied to the create or update mobile network dataNetwork operation. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. * @param options The options parameters. */ beginCreateOrUpdate( @@ -95,11 +95,11 @@ export interface DataNetworks { > >; /** - * Creates or updates a mobile network dataNetwork. + * Creates or updates a data 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 mobile network dataNetwork. - * @param parameters Parameters supplied to the create or update mobile network dataNetwork operation. + * @param dataNetworkName The name of the data network. + * @param parameters Parameters supplied to the create or update data network operation. * @param options The options parameters. */ beginCreateOrUpdateAndWait( @@ -110,10 +110,10 @@ export interface DataNetworks { options?: DataNetworksCreateOrUpdateOptionalParams ): Promise; /** - * Update data network tags. + * Updates data network tags. * @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 mobile network dataNetwork. + * @param dataNetworkName The name of the data network. * @param parameters Parameters supplied to update data network tags. * @param options The options parameters. */ diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts index 76d249544222..837e063c3d2a 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/index.ts @@ -10,9 +10,11 @@ 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 "./packetCoreControlPlaneVersions"; export * from "./packetCoreDataPlanes"; export * from "./services"; export * from "./simPolicies"; diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts index 955a1f3bcaf3..9a4a9d775d3e 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/mobileNetworks.ts @@ -108,7 +108,7 @@ export interface MobileNetworks { options?: MobileNetworksCreateOrUpdateOptionalParams ): Promise; /** - * Updates a mobile network update tags. + * Updates mobile network tags. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mobileNetworkName The name of the mobile network. * @param parameters Parameters supplied to update mobile network tags. @@ -121,7 +121,7 @@ export interface MobileNetworks { options?: MobileNetworksUpdateTagsOptionalParams ): Promise; /** - * List sim ids under a mobile network. + * 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. @@ -137,7 +137,7 @@ export interface MobileNetworks { > >; /** - * List sim ids under a mobile network. + * 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. diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts new file mode 100644 index 000000000000..93228208091b --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlaneVersions.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + PacketCoreControlPlaneVersion, + PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams, + PacketCoreControlPlaneVersionsGetOptionalParams, + PacketCoreControlPlaneVersionsGetResponse +} from "../models"; + +/// +/** Interface representing a PacketCoreControlPlaneVersions. */ +export interface PacketCoreControlPlaneVersions { + /** + * Lists all supported packet core control planes versions. + * @param options The options parameters. + */ + listByResourceGroup( + options?: PacketCoreControlPlaneVersionsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets information about the specified packet core control plane version. + * @param versionName The name of the packet core control plane version. + * @param options The options parameters. + */ + get( + versionName: string, + options?: PacketCoreControlPlaneVersionsGetOptionalParams + ): Promise; +} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts index 2a7af8a410b7..ddc209e4fc8a 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreControlPlanes.ts @@ -26,14 +26,14 @@ import { /** Interface representing a PacketCoreControlPlanes. */ export interface PacketCoreControlPlanes { /** - * Lists all the packetCoreControlPlanes in a subscription. + * Lists all the packet core control planes in a subscription. * @param options The options parameters. */ listBySubscription( options?: PacketCoreControlPlanesListBySubscriptionOptionalParams ): PagedAsyncIterableIterator; /** - * Lists all the packetCoreControlPlanes in a resource group. + * Lists all the packet core control planes in a resource group. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ @@ -75,7 +75,7 @@ export interface PacketCoreControlPlanes { options?: PacketCoreControlPlanesGetOptionalParams ): Promise; /** - * Creates or updates a PacketCoreControlPlane. + * Creates or updates a packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. * @param parameters Parameters supplied to the create or update packet core control plane operation. @@ -93,7 +93,7 @@ export interface PacketCoreControlPlanes { > >; /** - * Creates or updates a PacketCoreControlPlane. + * Creates or updates a packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. * @param parameters Parameters supplied to the create or update packet core control plane operation. @@ -106,10 +106,10 @@ export interface PacketCoreControlPlanes { options?: PacketCoreControlPlanesCreateOrUpdateOptionalParams ): Promise; /** - * Updates a PacketCoreControlPlane update tags. + * Updates packet core control planes tags. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to update PacketCoreControlPlane tags. + * @param parameters Parameters supplied to update packet core control plane tags. * @param options The options parameters. */ updateTags( diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts index ba5a4970f5da..1c618e0680c7 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/packetCoreDataPlanes.ts @@ -25,7 +25,7 @@ import { /** Interface representing a PacketCoreDataPlanes. */ export interface PacketCoreDataPlanes { /** - * Lists all the packetCoreDataPlanes associated with a packetCoreControlPlane. + * Lists all the packet core data planes associated with a packet core control plane. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param packetCoreControlPlaneName The name of the packet core control plane. * @param options The options parameters. @@ -75,7 +75,7 @@ export interface PacketCoreDataPlanes { options?: PacketCoreDataPlanesGetOptionalParams ): Promise; /** - * Creates or updates a PacketCoreDataPlane. + * Creates or updates a 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. @@ -95,7 +95,7 @@ export interface PacketCoreDataPlanes { > >; /** - * Creates or updates a PacketCoreDataPlane. + * Creates or updates a 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. @@ -110,11 +110,11 @@ export interface PacketCoreDataPlanes { options?: PacketCoreDataPlanesCreateOrUpdateOptionalParams ): Promise; /** - * Updates a PacketCoreDataPlane update tags. + * Updates packet core data planes tags. * @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. - * @param parameters Parameters supplied to update PacketCoreDataPlane tags. + * @param parameters Parameters supplied to update packet core data plane tags. * @param options The options parameters. */ updateTags( diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/services.ts index 68342f651bda..2b97e36bf843 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. * @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. * @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 - @@ -115,7 +115,7 @@ export interface Services { options?: ServicesCreateOrUpdateOptionalParams ): Promise; /** - * Update service tags. + * Updates service tags. * @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/simGroups.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts new file mode 100644 index 000000000000..d865e349d57a --- /dev/null +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simGroups.ts @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SimGroup, + SimGroupsListBySubscriptionOptionalParams, + SimGroupsListByResourceGroupOptionalParams, + SimGroupsDeleteOptionalParams, + SimGroupsGetOptionalParams, + SimGroupsGetResponse, + SimGroupsCreateOrUpdateOptionalParams, + SimGroupsCreateOrUpdateResponse, + TagsObject, + SimGroupsUpdateTagsOptionalParams, + SimGroupsUpdateTagsResponse +} from "../models"; + +/// +/** Interface representing a SimGroups. */ +export interface SimGroups { + /** + * Gets all the SIM groups in a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: SimGroupsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets all the SIM groups in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: SimGroupsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Deletes the specified SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + simGroupName: string, + options?: SimGroupsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + simGroupName: string, + options?: SimGroupsDeleteOptionalParams + ): Promise; + /** + * Gets information about the specified SIM group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + simGroupName: string, + options?: SimGroupsGetOptionalParams + ): Promise; + /** + * Creates or updates 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 create or update SIM group operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + simGroupName: string, + parameters: SimGroup, + options?: SimGroupsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SimGroupsCreateOrUpdateResponse + > + >; + /** + * Creates or updates 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 create or update SIM group operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + simGroupName: string, + parameters: SimGroup, + options?: SimGroupsCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates SIM group tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to update SIM group tags. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + simGroupName: string, + parameters: TagsObject, + options?: SimGroupsUpdateTagsOptionalParams + ): Promise; +} diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts index 7f44fa6a9470..55230429abb2 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/simPolicies.ts @@ -25,7 +25,7 @@ import { /** Interface representing a SimPolicies. */ export interface SimPolicies { /** - * Gets all the simPolicies in a mobile network. + * Gets all the SIM policies 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. @@ -36,7 +36,7 @@ export interface SimPolicies { options?: SimPoliciesListByMobileNetworkOptionalParams ): PagedAsyncIterableIterator; /** - * Deletes the specified sim policy. + * Deletes the specified SIM policy. * @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. @@ -49,7 +49,7 @@ export interface SimPolicies { options?: SimPoliciesDeleteOptionalParams ): Promise, void>>; /** - * Deletes the specified sim policy. + * Deletes the specified SIM policy. * @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. @@ -62,7 +62,7 @@ export interface SimPolicies { options?: SimPoliciesDeleteOptionalParams ): Promise; /** - * Gets information about the specified sim policy. + * Gets information about the specified SIM policy. * @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. @@ -75,11 +75,11 @@ export interface SimPolicies { options?: SimPoliciesGetOptionalParams ): Promise; /** - * Creates or updates a SimPolicy. + * Creates or updates a SIM policy. * @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. - * @param parameters Parameters supplied to the create or update sim policy operation. + * @param parameters Parameters supplied to the create or update SIM policy operation. * @param options The options parameters. */ beginCreateOrUpdate( @@ -95,11 +95,11 @@ export interface SimPolicies { > >; /** - * Creates or updates a SimPolicy. + * Creates or updates a SIM policy. * @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. - * @param parameters Parameters supplied to the create or update sim policy operation. + * @param parameters Parameters supplied to the create or update SIM policy operation. * @param options The options parameters. */ beginCreateOrUpdateAndWait( @@ -110,11 +110,11 @@ export interface SimPolicies { options?: SimPoliciesCreateOrUpdateOptionalParams ): Promise; /** - * Update sim policy tags. + * Updates SIM policy tags. * @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. - * @param parameters Parameters supplied to update Sim Policy tags. + * @param parameters Parameters supplied to update SIM policy tags. * @param options The options parameters. */ updateTags( diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts index f6c86252b271..e27b14792f94 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sims.ts @@ -10,79 +10,78 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { Sim, - SimsListBySubscriptionOptionalParams, - SimsListByResourceGroupOptionalParams, + SimsListBySimGroupOptionalParams, SimsDeleteOptionalParams, SimsGetOptionalParams, SimsGetResponse, SimsCreateOrUpdateOptionalParams, - SimsCreateOrUpdateResponse, - TagsObject, - SimsUpdateTagsOptionalParams, - SimsUpdateTagsResponse + SimsCreateOrUpdateResponse } from "../models"; /// /** Interface representing a Sims. */ export interface Sims { /** - * Gets all the sims in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: SimsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets all the Sims in a subscription. + * Gets all the SIMs in 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 options The options parameters. */ - listByResourceGroup( + listBySimGroup( resourceGroupName: string, - options?: SimsListByResourceGroupOptionalParams + simGroupName: string, + options?: SimsListBySimGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Deletes the specified sim. + * Deletes the specified SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. * @param options The options parameters. */ beginDelete( resourceGroupName: string, + simGroupName: string, simName: string, options?: SimsDeleteOptionalParams ): Promise, void>>; /** - * Deletes the specified sim. + * Deletes the specified SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. * @param options The options parameters. */ beginDeleteAndWait( resourceGroupName: string, + simGroupName: string, simName: string, options?: SimsDeleteOptionalParams ): Promise; /** - * Gets information about the specified sim. + * Gets information about the specified SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. * @param options The options parameters. */ get( resourceGroupName: string, + simGroupName: string, simName: string, options?: SimsGetOptionalParams ): Promise; /** - * Creates or updates a Sim. + * Creates or updates a SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. - * @param parameters Parameters supplied to the create or update sim operation. + * @param parameters Parameters supplied to the create or update SIM operation. * @param options The options parameters. */ beginCreateOrUpdate( resourceGroupName: string, + simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams @@ -93,29 +92,18 @@ export interface Sims { > >; /** - * Creates or updates a Sim. + * Creates or updates a SIM. * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. * @param simName The name of the SIM. - * @param parameters Parameters supplied to the create or update sim operation. + * @param parameters Parameters supplied to the create or update SIM operation. * @param options The options parameters. */ beginCreateOrUpdateAndWait( resourceGroupName: string, + simGroupName: string, simName: string, parameters: Sim, options?: SimsCreateOrUpdateOptionalParams ): Promise; - /** - * Updates a sim update tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simName The name of the SIM. - * @param parameters Parameters supplied to update sim tags. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - simName: string, - parameters: TagsObject, - options?: SimsUpdateTagsOptionalParams - ): Promise; } diff --git a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts index 994e27629f57..fb27ae93abbc 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/sites.ts @@ -110,7 +110,7 @@ export interface Sites { options?: SitesCreateOrUpdateOptionalParams ): Promise; /** - * Updates a site update tags. + * Updates site tags. * @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 3c1766e4776b..c3ae841c0b17 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/src/operationsInterfaces/slices.ts @@ -36,10 +36,10 @@ export interface Slices { options?: SlicesListByMobileNetworkOptionalParams ): PagedAsyncIterableIterator; /** - * Deletes the specified mobile network slice. + * Deletes the specified network slice. * @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 mobile network slice. + * @param sliceName The name of the network slice. * @param options The options parameters. */ beginDelete( @@ -49,10 +49,10 @@ export interface Slices { options?: SlicesDeleteOptionalParams ): Promise, void>>; /** - * Deletes the specified mobile network slice. + * Deletes the specified network slice. * @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 mobile network slice. + * @param sliceName The name of the network slice. * @param options The options parameters. */ beginDeleteAndWait( @@ -62,10 +62,10 @@ export interface Slices { options?: SlicesDeleteOptionalParams ): Promise; /** - * Gets information about the specified mobile network slice. + * Gets information about the specified network slice. * @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 mobile network slice. + * @param sliceName The name of the network slice. * @param options The options parameters. */ get( @@ -75,11 +75,11 @@ export interface Slices { options?: SlicesGetOptionalParams ): Promise; /** - * Creates or updates a mobile network slice. + * Creates or updates a network slice. * @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 mobile network slice. - * @param parameters Parameters supplied to the create or update mobile network slice operation. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. * @param options The options parameters. */ beginCreateOrUpdate( @@ -95,11 +95,11 @@ export interface Slices { > >; /** - * Creates or updates a mobile network slice. + * Creates or updates a network slice. * @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 mobile network slice. - * @param parameters Parameters supplied to the create or update mobile network slice operation. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to the create or update network slice operation. * @param options The options parameters. */ beginCreateOrUpdateAndWait( @@ -110,11 +110,11 @@ export interface Slices { options?: SlicesCreateOrUpdateOptionalParams ): Promise; /** - * Update slice tags. + * Updates slice tags. * @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 mobile network slice. - * @param parameters Parameters supplied to update mobile network slice tags. + * @param sliceName The name of the network slice. + * @param parameters Parameters supplied to update network slice tags. * @param options The options parameters. */ updateTags( diff --git a/sdk/mobilenetwork/arm-mobilenetwork/test/sampleTest.ts b/sdk/mobilenetwork/arm-mobilenetwork/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/mobilenetwork/arm-mobilenetwork/test/sampleTest.ts +++ b/sdk/mobilenetwork/arm-mobilenetwork/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { 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"