diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 09387f856d63..9ad8992abe95 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3155,7 +3155,7 @@ packages: version: 0.0.0 '@rush-temp/arm-networkcloud@file:projects/arm-networkcloud.tgz': - resolution: {integrity: sha512-D8qBS+5kWmS52C8cAVZwU8bxTzt/Rtm/ApCez9YZTUu6EG5gryBTHSAeU8Oc0JkdJ0qh+mWYmlWoYqAUouc73A==, tarball: file:projects/arm-networkcloud.tgz} + resolution: {integrity: sha512-p7NHYdfdyAdqAedVvrGqDCMW8kajyeT1K8UKGqaHecEzIUtHel4Fio5F76FIZwRgeKz5UBeCnjNxf12E+rDNiQ==, tarball: file:projects/arm-networkcloud.tgz} version: 0.0.0 '@rush-temp/arm-networkfunction@file:projects/arm-networkfunction.tgz': @@ -3591,7 +3591,7 @@ packages: version: 0.0.0 '@rush-temp/confidential-ledger@file:projects/confidential-ledger.tgz': - resolution: {integrity: sha512-Gh04SARYLYKqfJcMhnzqQ4aoQcWNw+tokGGhULmwQhutUaYCVjx69T3fzYTkEeXjWx/289eFK3zBD8TMA3p7+g==, tarball: file:projects/confidential-ledger.tgz} + resolution: {integrity: sha512-SJzc0t6IU+ncIo/2rsSt6PQzH5KpCAMYcFLxYBb4OripIcE4U5gKmotJfB7koFj1/r0T/9eZqpeD+1OTT0dJQQ==, tarball: file:projects/confidential-ledger.tgz} version: 0.0.0 '@rush-temp/container-registry@file:projects/container-registry.tgz': @@ -13720,17 +13720,16 @@ snapshots: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 '@azure/core-lro': 2.7.2 - '@microsoft/api-extractor': 7.48.0(@types/node@18.19.68) '@types/chai': 4.3.20 '@types/mocha': 10.0.10 '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + mocha: 10.8.2 + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.7.2 + typescript: 5.6.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' diff --git a/sdk/networkcloud/arm-networkcloud/CHANGELOG.md b/sdk/networkcloud/arm-networkcloud/CHANGELOG.md index cf9b166e2082..c7c22fa5d54d 100644 --- a/sdk/networkcloud/arm-networkcloud/CHANGELOG.md +++ b/sdk/networkcloud/arm-networkcloud/CHANGELOG.md @@ -1,15 +1,159 @@ # Release History - -## 2.0.0-beta.2 (Unreleased) - + +## 1.1.0-beta.1 (2024-12-23) +Compared with version 1.0.0 + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group KubernetesClusterFeatures + - Added operation Clusters.beginContinueUpdateVersion + - Added operation Clusters.beginContinueUpdateVersionAndWait + - Added operation Clusters.beginScanRuntime + - Added operation Clusters.beginScanRuntimeAndWait + - Added Interface AdministratorConfigurationPatch + - Added Interface AnalyticsOutputSettings + - Added Interface ClusterContinueUpdateVersionParameters + - Added Interface ClusterScanRuntimeParameters + - Added Interface ClustersContinueUpdateVersionHeaders + - Added Interface ClustersContinueUpdateVersionOptionalParams + - Added Interface ClusterSecretArchive + - Added Interface ClustersScanRuntimeHeaders + - Added Interface ClustersScanRuntimeOptionalParams + - Added Interface ClusterUpdateStrategy + - Added Interface CommandOutputSettings + - Added Interface IdentitySelector + - Added Interface KubernetesClusterFeature + - Added Interface KubernetesClusterFeatureList + - Added Interface KubernetesClusterFeaturePatchParameters + - Added Interface KubernetesClusterFeaturesCreateOrUpdateHeaders + - Added Interface KubernetesClusterFeaturesCreateOrUpdateOptionalParams + - Added Interface KubernetesClusterFeaturesDeleteHeaders + - Added Interface KubernetesClusterFeaturesDeleteOptionalParams + - Added Interface KubernetesClusterFeaturesGetOptionalParams + - Added Interface KubernetesClusterFeaturesListByKubernetesClusterNextOptionalParams + - Added Interface KubernetesClusterFeaturesListByKubernetesClusterOptionalParams + - Added Interface KubernetesClusterFeaturesUpdateHeaders + - Added Interface KubernetesClusterFeaturesUpdateOptionalParams + - Added Interface L2ServiceLoadBalancerConfiguration + - Added Interface ManagedServiceIdentity + - Added Interface NodePoolAdministratorConfigurationPatch + - Added Interface RuntimeProtectionConfiguration + - Added Interface RuntimeProtectionStatus + - Added Interface SecretArchiveReference + - Added Interface SecretArchiveSettings + - Added Interface SecretRotationStatus + - Added Interface StringKeyValuePair + - Added Interface UserAssignedIdentity + - Added Interface VulnerabilityScanningSettings + - Added Interface VulnerabilityScanningSettingsPatch + - Added Type Alias AgentPoolsDeleteResponse + - Added Type Alias BareMetalMachineKeySetsDeleteResponse + - Added Type Alias BareMetalMachinesDeleteResponse + - Added Type Alias BmcKeySetsDeleteResponse + - Added Type Alias CloudServicesNetworksDeleteResponse + - Added Type Alias ClusterContinueUpdateVersionMachineGroupTargetingMode + - Added Type Alias ClusterManagersDeleteResponse + - Added Type Alias ClusterScanRuntimeParametersScanActivity + - Added Type Alias ClustersContinueUpdateVersionResponse + - Added Type Alias ClustersDeleteResponse + - Added Type Alias ClusterSecretArchiveEnabled + - Added Type Alias ClustersScanRuntimeResponse + - Added Type Alias ClusterUpdateStrategyType + - Added Type Alias ConsolesDeleteResponse + - Added Type Alias KubernetesClusterFeatureAvailabilityLifecycle + - Added Type Alias KubernetesClusterFeatureDetailedStatus + - Added Type Alias KubernetesClusterFeatureProvisioningState + - Added Type Alias KubernetesClusterFeatureRequired + - Added Type Alias KubernetesClusterFeaturesCreateOrUpdateResponse + - Added Type Alias KubernetesClusterFeaturesDeleteResponse + - Added Type Alias KubernetesClusterFeaturesGetResponse + - Added Type Alias KubernetesClusterFeaturesListByKubernetesClusterNextResponse + - Added Type Alias KubernetesClusterFeaturesListByKubernetesClusterResponse + - Added Type Alias KubernetesClusterFeaturesUpdateResponse + - Added Type Alias KubernetesClustersDeleteResponse + - Added Type Alias L2NetworksDeleteResponse + - Added Type Alias L3NetworksDeleteResponse + - Added Type Alias ManagedServiceIdentitySelectorType + - Added Type Alias ManagedServiceIdentityType + - Added Type Alias MetricsConfigurationsDeleteResponse + - Added Type Alias RacksDeleteResponse + - Added Type Alias RuntimeProtectionEnforcementLevel + - Added Type Alias StorageAppliancesDeleteResponse + - Added Type Alias TrunkedNetworksDeleteResponse + - Added Type Alias VirtualMachinesDeleteResponse + - Added Type Alias VolumesDeleteResponse + - Added Type Alias VulnerabilityScanningSettingsContainerScan + - Interface AgentPoolPatchParameters has a new optional parameter administratorConfiguration + - Interface AgentPoolsUpdateHeaders has a new optional parameter location + - Interface AgentPoolUpgradeSettings has a new optional parameter drainTimeout + - Interface AgentPoolUpgradeSettings has a new optional parameter maxUnavailable + - Interface BareMetalMachine has a new optional parameter machineClusterVersion + - Interface BareMetalMachine has a new optional parameter machineRoles + - Interface BareMetalMachine has a new optional parameter runtimeProtectionStatus + - Interface BareMetalMachine has a new optional parameter secretRotationStatus + - Interface BareMetalMachineKeySetsUpdateHeaders has a new optional parameter location + - Interface BareMetalMachinesUpdateHeaders has a new optional parameter location + - Interface BmcKeySetsUpdateHeaders has a new optional parameter location + - Interface CloudServicesNetworksUpdateHeaders has a new optional parameter location + - Interface Cluster has a new optional parameter analyticsOutputSettings + - Interface Cluster has a new optional parameter commandOutputSettings + - Interface Cluster has a new optional parameter identity + - Interface Cluster has a new optional parameter runtimeProtectionConfiguration + - Interface Cluster has a new optional parameter secretArchive + - Interface Cluster has a new optional parameter secretArchiveSettings + - Interface Cluster has a new optional parameter updateStrategy + - Interface Cluster has a new optional parameter vulnerabilityScanningSettings + - Interface ClusterManager has a new optional parameter identity + - Interface ClusterManagerPatchParameters has a new optional parameter identity + - Interface ClusterPatchParameters has a new optional parameter analyticsOutputSettings + - Interface ClusterPatchParameters has a new optional parameter commandOutputSettings + - Interface ClusterPatchParameters has a new optional parameter identity + - Interface ClusterPatchParameters has a new optional parameter runtimeProtectionConfiguration + - Interface ClusterPatchParameters has a new optional parameter secretArchive + - Interface ClusterPatchParameters has a new optional parameter secretArchiveSettings + - Interface ClusterPatchParameters has a new optional parameter updateStrategy + - Interface ClusterPatchParameters has a new optional parameter vulnerabilityScanningSettings + - Interface ClustersUpdateHeaders has a new optional parameter location + - Interface ConsolesUpdateHeaders has a new optional parameter location + - Interface ControlPlaneNodePatchConfiguration has a new optional parameter administratorConfiguration + - Interface KeySetUser has a new optional parameter userPrincipalName + - Interface KubernetesClusterPatchParameters has a new optional parameter administratorConfiguration + - Interface KubernetesClustersUpdateHeaders has a new optional parameter location + - Interface MetricsConfigurationsUpdateHeaders has a new optional parameter location + - Interface NetworkConfiguration has a new optional parameter l2ServiceLoadBalancerConfiguration + - Interface OperationStatusResult has a new optional parameter exitCode + - Interface OperationStatusResult has a new optional parameter outputHead + - Interface OperationStatusResult has a new optional parameter resultRef + - Interface OperationStatusResult has a new optional parameter resultUrl + - Interface RacksUpdateHeaders has a new optional parameter location + - Interface StorageAppliance has a new optional parameter manufacturer + - Interface StorageAppliance has a new optional parameter model + - Interface StorageAppliance has a new optional parameter secretRotationStatus + - Interface StorageAppliance has a new optional parameter version + - Interface StorageAppliancesUpdateHeaders has a new optional parameter location + - Interface VirtualMachine has a new optional parameter consoleExtendedLocation + - Interface VirtualMachinesUpdateHeaders has a new optional parameter location + - Added Enum KnownClusterContinueUpdateVersionMachineGroupTargetingMode + - Added Enum KnownClusterScanRuntimeParametersScanActivity + - Added Enum KnownClusterSecretArchiveEnabled + - Added Enum KnownClusterUpdateStrategyType + - Added Enum KnownKubernetesClusterFeatureAvailabilityLifecycle + - Added Enum KnownKubernetesClusterFeatureDetailedStatus + - Added Enum KnownKubernetesClusterFeatureProvisioningState + - Added Enum KnownKubernetesClusterFeatureRequired + - Added Enum KnownManagedServiceIdentitySelectorType + - Added Enum KnownManagedServiceIdentityType + - Added Enum KnownRuntimeProtectionEnforcementLevel + - Added Enum KnownVulnerabilityScanningSettingsContainerScan + - Enum KnownClusterConnectionStatus has a new value Disconnected + - Enum KnownClusterDetailedStatus has a new value UpdatePaused + - Enum KnownOsDiskCreateOption has a new value Persistent + - Enum KnownRackSkuProvisioningState has a new value Canceled + - Enum KnownRackSkuProvisioningState has a new value Failed + - Enum KnownStorageApplianceDetailedStatus has a new value Degraded + - Enum KnownVirtualMachineDeviceModelType has a new value T3 + + ## 2.0.0-beta.1 (2024-11-18) Compared with version 1.0.0 diff --git a/sdk/networkcloud/arm-networkcloud/README.md b/sdk/networkcloud/arm-networkcloud/README.md index bb75025a8c98..61fd37aa54d0 100644 --- a/sdk/networkcloud/arm-networkcloud/README.md +++ b/sdk/networkcloud/arm-networkcloud/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure NetworkCloud** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/networkcloud/arm-networkcloud/_meta.json b/sdk/networkcloud/arm-networkcloud/_meta.json index 4343fbe8a3fa..a21d57b3e8d6 100644 --- a/sdk/networkcloud/arm-networkcloud/_meta.json +++ b/sdk/networkcloud/arm-networkcloud/_meta.json @@ -1,8 +1,8 @@ { - "commit": "297c3a012316e290e6a6ab737ec8944611554542", + "commit": "c0a4c7e47361aebbcf59dd4408f565fe5b5c1935", "readme": "specification/networkcloud/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\networkcloud\\resource-manager\\readme.md --use=@autorest/typescript@6.0.28 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --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/networkcloud/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.15", - "use": "@autorest/typescript@6.0.28" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/networkcloud/arm-networkcloud/assets.json b/sdk/networkcloud/arm-networkcloud/assets.json deleted file mode 100644 index b49e2e68a9dd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/networkcloud/arm-networkcloud", - "Tag": "js/networkcloud/arm-networkcloud_8692b651dd" -} diff --git a/sdk/networkcloud/arm-networkcloud/package.json b/sdk/networkcloud/arm-networkcloud/package.json index aac6c56f1d64..0537e206d1f8 100644 --- a/sdk/networkcloud/arm-networkcloud/package.json +++ b/sdk/networkcloud/arm-networkcloud/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetworkCloud.", - "version": "2.0.0-beta.2", + "version": "1.1.0-beta.1", "engines": { "node": ">=18.0.0" }, @@ -28,14 +28,13 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-networkcloud.d.ts", "devDependencies": { - "@microsoft/api-extractor": "^7.31.1", - "typescript": "~5.7.2", + "typescript": "~5.6.2", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", - "mocha": "^11.0.2", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", "tsx": "^4.7.1", "@types/chai": "^4.2.8", @@ -103,13 +102,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud" +} \ No newline at end of file diff --git a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud.api.md b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud.api.md index 3cb4a58176fd..23e3993ebd28 100644 --- a/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud.api.md +++ b/sdk/networkcloud/arm-networkcloud/review/arm-networkcloud.api.md @@ -186,6 +186,12 @@ export interface AgentPoolUpgradeSettings { maxUnavailable?: string; } +// @public +export interface AnalyticsOutputSettings { + analyticsWorkspaceId?: string; + associatedIdentity?: IdentitySelector; +} + // @public export interface AttachedNetworkConfiguration { l2Networks?: L2NetworkAttachmentConfiguration[]; @@ -984,6 +990,7 @@ export type CloudServicesNetworksUpdateResponse = CloudServicesNetwork; // @public export interface Cluster extends TrackedResource { aggregatorOrSingleRackDefinition: RackDefinition; + analyticsOutputSettings?: AnalyticsOutputSettings; analyticsWorkspaceId?: string; readonly availableUpgradeVersions?: ClusterAvailableUpgradeVersion[]; readonly clusterCapacity?: ClusterCapacity; @@ -1009,8 +1016,10 @@ export interface Cluster extends TrackedResource { readonly provisioningState?: ClusterProvisioningState; runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; secretArchive?: ClusterSecretArchive; + secretArchiveSettings?: SecretArchiveSettings; readonly supportExpiryDate?: string; updateStrategy?: ClusterUpdateStrategy; + vulnerabilityScanningSettings?: VulnerabilityScanningSettings; readonly workloadResourceIds?: string[]; } @@ -1223,6 +1232,7 @@ export type ClusterMetricsConfigurationProvisioningState = string; // @public export interface ClusterPatchParameters { aggregatorOrSingleRackDefinition?: RackDefinition; + analyticsOutputSettings?: AnalyticsOutputSettings; clusterLocation?: string; clusterServicePrincipal?: ServicePrincipalInformation; commandOutputSettings?: CommandOutputSettings; @@ -1231,10 +1241,12 @@ export interface ClusterPatchParameters { identity?: ManagedServiceIdentity; runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; secretArchive?: ClusterSecretArchive; + secretArchiveSettings?: SecretArchiveSettings; tags?: { [propertyName: string]: string; }; updateStrategy?: ClusterUpdateStrategy; + vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; } // @public @@ -2257,7 +2269,8 @@ export enum KnownOrigin { // @public export enum KnownOsDiskCreateOption { - Ephemeral = "Ephemeral" + Ephemeral = "Ephemeral", + Persistent = "Persistent" } // @public @@ -2326,6 +2339,7 @@ export enum KnownSkipShutdown { // @public export enum KnownStorageApplianceDetailedStatus { Available = "Available", + Degraded = "Degraded", Error = "Error", Provisioning = "Provisioning" } @@ -2388,7 +2402,8 @@ export enum KnownVirtualMachineDetailedStatus { // @public export enum KnownVirtualMachineDeviceModelType { T1 = "T1", - T2 = "T2" + T2 = "T2", + T3 = "T3" } // @public @@ -2460,6 +2475,12 @@ export enum KnownVolumeProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownVulnerabilityScanningSettingsContainerScan { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownWorkloadImpact { False = "False", @@ -3575,6 +3596,12 @@ export interface SecretArchiveReference { readonly secretVersion?: string; } +// @public +export interface SecretArchiveSettings { + associatedIdentity?: IdentitySelector; + vaultUri?: string; +} + // @public export interface SecretRotationStatus { readonly expirePeriodDays?: number; @@ -3990,6 +4017,7 @@ export interface VirtualMachine extends TrackedResource { bootMethod?: VirtualMachineBootMethod; cloudServicesNetworkAttachment: NetworkAttachment; readonly clusterId?: string; + consoleExtendedLocation?: ExtendedLocation; cpuCores: number; readonly detailedStatus?: VirtualMachineDetailedStatus; readonly detailedStatusMessage?: string; @@ -4341,6 +4369,19 @@ export interface VolumesUpdateOptionalParams extends coreClient.OperationOptions // @public export type VolumesUpdateResponse = Volume; +// @public +export interface VulnerabilityScanningSettings { + containerScan?: VulnerabilityScanningSettingsContainerScan; +} + +// @public +export type VulnerabilityScanningSettingsContainerScan = string; + +// @public +export interface VulnerabilityScanningSettingsPatch { + containerScan?: VulnerabilityScanningSettingsContainerScan; +} + // @public export type WorkloadImpact = string; diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsCreateOrUpdateSample.ts deleted file mode 100644 index c7697d321c81..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AgentPool, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Create.json - */ -async function createOrUpdateKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolParameters: AgentPool = { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - labels: [{ key: "kubernetes.label", value: "true" }], - location: "location", - mode: "System", - tags: { key1: "myvalue1", key2: "myvalue2" }, - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - agentPoolParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsDeleteSample.ts deleted file mode 100644 index 4387cc6d4396..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster agent pool. - * - * @summary Delete the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Delete.json - */ -async function deleteKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsGetSample.ts deleted file mode 100644 index a3a1b90c6688..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided Kubernetes cluster agent pool. - * - * @summary Get properties of the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json - */ -async function getKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.get( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main() { - getKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsListByKubernetesClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsListByKubernetesClusterSample.ts deleted file mode 100644 index e5f73d56654b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsListByKubernetesClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of agent pools for the provided Kubernetes cluster. - * - * @summary Get a list of agent pools for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_ListByKubernetesCluster.json - */ -async function listAgentPoolsOfTheKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.agentPools.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAgentPoolsOfTheKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsUpdateSample.ts deleted file mode 100644 index c9894b4b06a5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/agentPoolsUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AgentPoolPatchParameters, - AgentPoolsUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Patch.json - */ -async function patchKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolUpdateParameters: AgentPoolPatchParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - tags: { key1: "myvalue1", key2: "myvalue2" }, - upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, - }; - const options: AgentPoolsUpdateOptionalParams = { agentPoolUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsCreateOrUpdateSample.ts deleted file mode 100644 index 94db552f9acd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BareMetalMachineKeySet, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new bare metal machine key set or update the existing one for the provided cluster. - * - * @summary Create a new bare metal machine key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Create.json - */ -async function createOrUpdateBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetParameters: BareMetalMachineKeySet = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - location: "location", - osGroupName: "standardAccessGroup", - privilegeLevel: "Standard", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.bareMetalMachineKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - bareMetalMachineKeySetParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsDeleteSample.ts deleted file mode 100644 index a458896b7afd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the bare metal machine key set of the provided cluster. - * - * @summary Delete the bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Delete.json - */ -async function deleteBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main() { - deleteBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsGetSample.ts deleted file mode 100644 index 2c9e83cfc938..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get bare metal machine key set of the provided cluster. - * - * @summary Get bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json - */ -async function getBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.get( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main() { - getBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsListByClusterSample.ts deleted file mode 100644 index 469323ee8894..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsListByClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of bare metal machine key sets for the provided cluster. - * - * @summary Get a list of bare metal machine key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_ListByCluster.json - */ -async function listBareMetalMachineKeySetsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachineKeySets.listByCluster( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachineKeySetsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsUpdateSample.ts deleted file mode 100644 index bfd3b96877c8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachineKeySetsUpdateSample.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 { - BareMetalMachineKeySetPatchParameters, - BareMetalMachineKeySetsUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Patch.json - */ -async function patchBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetUpdateParameters: BareMetalMachineKeySetPatchParameters = - { - expiration: new Date("2022-12-31T23:59:59.008Z"), - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options: BareMetalMachineKeySetsUpdateOptionalParams = { - bareMetalMachineKeySetUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - ); - console.log(result); -} - -async function main() { - patchBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCordonSample.ts deleted file mode 100644 index 2d659f287539..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCordonSample.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 { - BareMetalMachineCordonParameters, - BareMetalMachinesCordonOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Cordon the provided bare metal machine's Kubernetes node. - * - * @summary Cordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Cordon.json - */ -async function cordonBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineCordonParameters: BareMetalMachineCordonParameters = { - evacuate: "True", - }; - const options: BareMetalMachinesCordonOptionalParams = { - bareMetalMachineCordonParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCordonAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - cordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCreateOrUpdateSample.ts deleted file mode 100644 index 67bc71f6b358..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesCreateOrUpdateSample.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BareMetalMachine, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new bare metal machine or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new bare metal machine or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Create.json - */ -async function createOrUpdateBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineParameters: BareMetalMachine = { - bmcConnectionString: "bmcconnectionstring", - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:00", - bootMacAddress: "00:00:4e:00:58:af", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - machineDetails: "User-provided machine details.", - machineName: "r01c001", - machineSkuId: "684E-3B16-399E", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesDeleteSample.ts deleted file mode 100644 index 91d9a17785d0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided bare metal machine. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided bare metal machine. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Delete.json - */ -async function deleteBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginDeleteAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - deleteBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesGetSample.ts deleted file mode 100644 index 4be051e7d876..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided bare metal machine. - * - * @summary Get properties of the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json - */ -async function getBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.get( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - getBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListByResourceGroupSample.ts deleted file mode 100644 index 86cea406f77e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of bare metal machines in the provided resource group. - * - * @summary Get a list of bare metal machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListByResourceGroup.json - */ -async function listBareMetalMachinesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachines.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachinesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListBySubscriptionSample.ts deleted file mode 100644 index a29e78895662..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of bare metal machines in the provided subscription. - * - * @summary Get a list of bare metal machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListBySubscription.json - */ -async function listBareMetalMachinesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachines.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachinesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesPowerOffSample.ts deleted file mode 100644 index 71c0995d5072..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesPowerOffSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachinePowerOffParameters, - BareMetalMachinesPowerOffOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Power off the provided bare metal machine. - * - * @summary Power off the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_PowerOff.json - */ -async function powerOffBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachinePowerOffParameters: BareMetalMachinePowerOffParameters = - { skipShutdown: "True" }; - const options: BareMetalMachinesPowerOffOptionalParams = { - bareMetalMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginPowerOffAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - powerOffBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReimageSample.ts deleted file mode 100644 index 084cec6a8a06..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReimageSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Reimage the provided bare metal machine. - * - * @summary Reimage the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Reimage.json - */ -async function reimageBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReimageAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - reimageBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReplaceSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReplaceSample.ts deleted file mode 100644 index 83432e15d1aa..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesReplaceSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachineReplaceParameters, - BareMetalMachinesReplaceOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Replace the provided bare metal machine. - * - * @summary Replace the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Replace.json - */ -async function replaceBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineReplaceParameters: BareMetalMachineReplaceParameters = { - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:ad", - bootMacAddress: "00:00:4e:00:58:af", - machineName: "name", - serialNumber: "BM1219XXX", - }; - const options: BareMetalMachinesReplaceOptionalParams = { - bareMetalMachineReplaceParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReplaceAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - replaceBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRestartSample.ts deleted file mode 100644 index 3206a1b50e98..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRestartSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Restart the provided bare metal machine. - * - * @summary Restart the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Restart.json - */ -async function restartBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRestartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - restartBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunCommandSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunCommandSample.ts deleted file mode 100644 index affdd5903dfe..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunCommandSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachineRunCommandParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunCommand.json - */ -async function runCommandOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters = - { - arguments: ["--argument1", "argument2"], - limitTimeSeconds: 60, - script: "cHdkCg==", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunCommandAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunCommandParameters, - ); - console.log(result); -} - -async function main() { - runCommandOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsSample.ts deleted file mode 100644 index 934e95ee2f03..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunDataExtractsSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachineRunDataExtractsParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunDataExtracts.json - */ -async function runDataExtractionOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters = - { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["SysInfo", "TTYLog"], - command: "hardware-support-data-collection", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunDataExtractsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, - ); - console.log(result); -} - -async function main() { - runDataExtractionOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunReadCommandsSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunReadCommandsSample.ts deleted file mode 100644 index 40f33b11b94e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesRunReadCommandsSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachineRunReadCommandsParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunReadCommands.json - */ -async function runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters = - { - limitTimeSeconds: 60, - commands: [ - { arguments: ["pods", "-A"], command: "kubectl get" }, - { arguments: ["192.168.0.99", "-c", "3"], command: "ping" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - ); - console.log(result); -} - -async function main() { - runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesStartSample.ts deleted file mode 100644 index 0de69d64e7e9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesStartSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start the provided bare metal machine. - * - * @summary Start the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Start.json - */ -async function startBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginStartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - startBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUncordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUncordonSample.ts deleted file mode 100644 index 3135d60e38c7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUncordonSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Uncordon the provided bare metal machine's Kubernetes node. - * - * @summary Uncordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Uncordon.json - */ -async function uncordonBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUncordonAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - uncordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUpdateSample.ts deleted file mode 100644 index facf40c50473..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bareMetalMachinesUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachinePatchParameters, - BareMetalMachinesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Patch.json - */ -async function patchBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineUpdateParameters: BareMetalMachinePatchParameters = { - machineDetails: "machinedetails", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: BareMetalMachinesUpdateOptionalParams = { - bareMetalMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - patchBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsCreateOrUpdateSample.ts deleted file mode 100644 index c6f32228e60b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BmcKeySet, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new baseboard management controller key set or update the existing one for the provided cluster. - * - * @summary Create a new baseboard management controller key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Create.json - */ -async function createOrUpdateBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetParameters: BmcKeySet = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - privilegeLevel: "Administrator", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - bmcKeySetParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsDeleteSample.ts deleted file mode 100644 index 65e4975cfb94..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the baseboard management controller key set of the provided cluster. - * - * @summary Delete the baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Delete.json - */ -async function deleteBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - ); - console.log(result); -} - -async function main() { - deleteBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsGetSample.ts deleted file mode 100644 index 0ab7d176bac9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get baseboard management controller key set of the provided cluster. - * - * @summary Get baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json - */ -async function getBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.get( - resourceGroupName, - clusterName, - bmcKeySetName, - ); - console.log(result); -} - -async function main() { - getBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsListByClusterSample.ts deleted file mode 100644 index 0a0a2ca745a8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsListByClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of baseboard management controller key sets for the provided cluster. - * - * @summary Get a list of baseboard management controller key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_ListByCluster.json - */ -async function listBaseboardManagementControllerKeySetsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bmcKeySets.listByCluster( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBaseboardManagementControllerKeySetsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsUpdateSample.ts deleted file mode 100644 index 4940f7fc3c0b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/bmcKeySetsUpdateSample.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BmcKeySetPatchParameters, - BmcKeySetsUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Patch.json - */ -async function patchBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetUpdateParameters: BmcKeySetPatchParameters = { - expiration: new Date("2022-12-31T23:59:59.008Z"), - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options: BmcKeySetsUpdateOptionalParams = { bmcKeySetUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - options, - ); - console.log(result); -} - -async function main() { - patchBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 2d88858913ba..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CloudServicesNetwork, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new cloud services network or update the properties of the existing cloud services network. - * - * @summary Create a new cloud services network or update the properties of the existing cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Create.json - */ -async function createOrUpdateCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkParameters: CloudServicesNetwork = { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [ - { domainName: "storageaccountex.blob.core.windows.net", port: 443 }, - ], - }, - ], - enableDefaultEgressEndpoints: "False", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - cloudServicesNetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksDeleteSample.ts deleted file mode 100644 index 43272822c7be..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided cloud services network. - * - * @summary Delete the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Delete.json - */ -async function deleteCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginDeleteAndWait( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main() { - deleteCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksGetSample.ts deleted file mode 100644 index b6c85a2484e8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided cloud services network. - * - * @summary Get properties of the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json - */ -async function getCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.get( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main() { - getCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListByResourceGroupSample.ts deleted file mode 100644 index 9acabedbc877..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of cloud services networks in the provided resource group. - * - * @summary Get a list of cloud services networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListByResourceGroup.json - */ -async function listCloudServicesNetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudServicesNetworks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCloudServicesNetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListBySubscriptionSample.ts deleted file mode 100644 index 75873c6a5b70..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of cloud services networks in the provided subscription. - * - * @summary Get a list of cloud services networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListBySubscription.json - */ -async function listCloudServicesNetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudServicesNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCloudServicesNetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksUpdateSample.ts deleted file mode 100644 index 6ed22847d911..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/cloudServicesNetworksUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CloudServicesNetworkPatchParameters, - CloudServicesNetworksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Patch.json - */ -async function patchCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkUpdateParameters: CloudServicesNetworkPatchParameters = - { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [ - { domainName: "storageaccountex.blob.core.windows.net", port: 443 }, - ], - }, - ], - enableDefaultEgressEndpoints: "False", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: CloudServicesNetworksUpdateOptionalParams = { - cloudServicesNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersCreateOrUpdateSample.ts deleted file mode 100644 index 339da6457153..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersCreateOrUpdateSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ClusterManager, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create.json - */ -async function createOrUpdateClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters: ClusterManager = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { type: "SystemAssigned" }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create_Uami.json - */ -async function createOrUpdateClusterManagerWithUserAssignedIdentity() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters: ClusterManager = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateClusterManager(); - createOrUpdateClusterManagerWithUserAssignedIdentity(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersDeleteSample.ts deleted file mode 100644 index 74835e71c48d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided cluster manager. - * - * @summary Delete the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Delete.json - */ -async function deleteClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginDeleteAndWait( - resourceGroupName, - clusterManagerName, - ); - console.log(result); -} - -async function main() { - deleteClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersGetSample.ts deleted file mode 100644 index bb1d8c46822f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of the provided cluster manager. - * - * @summary Get the properties of the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json - */ -async function getClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.get( - resourceGroupName, - clusterManagerName, - ); - console.log(result); -} - -async function main() { - getClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListByResourceGroupSample.ts deleted file mode 100644 index 225f97edf840..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of cluster managers in the provided resource group. - * - * @summary Get a list of cluster managers in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListByResourceGroup.json - */ -async function listClusterManagersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterManagers.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClusterManagersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListBySubscriptionSample.ts deleted file mode 100644 index d4512b994519..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of cluster managers in the provided subscription. - * - * @summary Get a list of cluster managers in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListBySubscription.json - */ -async function listClusterManagersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterManagers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClusterManagersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateSample.ts deleted file mode 100644 index 078025fec242..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clusterManagersUpdateSample.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 { - ClusterManagerPatchParameters, - ClusterManagersUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Patch.json - */ -async function patchClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerUpdateParameters: ClusterManagerPatchParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClusterManagersUpdateOptionalParams = { - clusterManagerUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.update( - resourceGroupName, - clusterManagerName, - options, - ); - console.log(result); -} - -async function main() { - patchClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersContinueUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersContinueUpdateVersionSample.ts deleted file mode 100644 index 23363b876cad..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersContinueUpdateVersionSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterContinueUpdateVersionParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * - * @summary Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ContinueUpdateVersion.json - */ -async function continueUpdateClusterVersion() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters = - { machineGroupTargetingMode: "AlphaByRack" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginContinueUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterContinueUpdateVersionParameters, - ); - console.log(result); -} - -async function main() { - continueUpdateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersCreateOrUpdateSample.ts deleted file mode 100644 index a1a46b51ce40..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Cluster, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new cluster or update the properties of the cluster if it exists. - * - * @summary Create a new cluster or update the properties of the cluster if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Create.json - */ -async function createOrUpdateCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterParameters: Cluster = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "AA1234", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - clusterLocation: "Foo Street, 3rd Floor, row 9", - clusterServicePrincipal: { - applicationId: "12345678-1234-1234-1234-123456789012", - password: "{password}", - principalId: "00000008-0004-0004-0004-000000000012", - tenantId: "80000000-4000-4000-4000-120000000000", - }, - clusterType: "SingleRack", - clusterVersion: "1.0.0", - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", - }, - containerUrl: - "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - computeRackDefinitions: [ - { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "AA1234", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - ], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkFabricId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName", - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - secretArchive: { - keyVaultId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName", - useKeyVault: "True", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - clusterParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeleteSample.ts deleted file mode 100644 index 82178e264fa3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided cluster. - * - * @summary Delete the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Delete.json - */ -async function deleteCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main() { - deleteCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeploySample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeploySample.ts deleted file mode 100644 index 528ceb23c65b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersDeploySample.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterDeployParameters, - ClustersDeployOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy.json - */ -async function deployCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters: ClusterDeployParameters = {}; - const options: ClustersDeployOptionalParams = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy_SkipValidation.json - */ -async function deployClusterSkippingValidation() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters: ClusterDeployParameters = { - skipValidationsForMachines: ["bmmName1"], - }; - const options: ClustersDeployOptionalParams = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main() { - deployCluster(); - deployClusterSkippingValidation(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersGetSample.ts deleted file mode 100644 index a401c420ecb7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided cluster. - * - * @summary Get properties of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json - */ -async function getCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - getCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListByResourceGroupSample.ts deleted file mode 100644 index 938e7293a013..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of clusters in the provided resource group. - * - * @summary Get a list of clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListByResourceGroup.json - */ -async function listClustersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClustersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListBySubscriptionSample.ts deleted file mode 100644 index fb5aac01e26d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of clusters in the provided subscription. - * - * @summary Get a list of clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListBySubscription.json - */ -async function listClustersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClustersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersScanRuntimeSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersScanRuntimeSample.ts deleted file mode 100644 index c61e9c230b5c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersScanRuntimeSample.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 { - ClusterScanRuntimeParameters, - ClustersScanRuntimeOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * - * @summary Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ScanRuntime.json - */ -async function executeARuntimeProtectionScanOnTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterScanRuntimeParameters: ClusterScanRuntimeParameters = { - scanActivity: "Scan", - }; - const options: ClustersScanRuntimeOptionalParams = { - clusterScanRuntimeParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginScanRuntimeAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main() { - executeARuntimeProtectionScanOnTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateSample.ts deleted file mode 100644 index 65c151c685a2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateSample.ts +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterPatchParameters, - ClustersUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json - */ -async function patchClusterAggregatorOrSingleRackDefinition() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "newSerialNumber", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_CommandOutput.json - */ -async function patchClusterCommandOutput() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - containerUrl: - "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_Location.json - */ -async function patchClusterLocation() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - clusterLocation: "Foo Street, 3rd Floor, row 9", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_RuntimeProtectionConfiguration.json - */ -async function patchRuntimeProtectionConfiguration() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_SecretArchive.json - */ -async function patchSecretArchive() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - secretArchive: { - keyVaultId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName", - useKeyVault: "True", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_UpdateStrategy.json - */ -async function patchUpdateStrategy() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main() { - patchClusterAggregatorOrSingleRackDefinition(); - patchClusterCommandOutput(); - patchClusterLocation(); - patchRuntimeProtectionConfiguration(); - patchSecretArchive(); - patchUpdateStrategy(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateVersionSample.ts deleted file mode 100644 index e8e0d647b315..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/clustersUpdateVersionSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterUpdateVersionParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update the version of the provided cluster to one of the available supported versions. - * - * @summary Update the version of the provided cluster to one of the available supported versions. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_UpdateVersion.json - */ -async function updateClusterVersion() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateVersionParameters: ClusterUpdateVersionParameters = { - targetClusterVersion: "2.0", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterUpdateVersionParameters, - ); - console.log(result); -} - -async function main() { - updateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesCreateOrUpdateSample.ts deleted file mode 100644 index b954c189d226..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Console, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new virtual machine console or update the properties of the existing virtual machine console. - * - * @summary Create a new virtual machine console or update the properties of the existing virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Create.json - */ -async function createOrUpdateVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleParameters: Console = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - consoleParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesDeleteSample.ts deleted file mode 100644 index 0b55048fecca..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided virtual machine console. - * - * @summary Delete the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Delete.json - */ -async function deleteVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - ); - console.log(result); -} - -async function main() { - deleteVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesGetSample.ts deleted file mode 100644 index ebf9811607ce..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided virtual machine console. - * - * @summary Get properties of the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json - */ -async function getVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.get( - resourceGroupName, - virtualMachineName, - consoleName, - ); - console.log(result); -} - -async function main() { - getVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesListByVirtualMachineSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesListByVirtualMachineSample.ts deleted file mode 100644 index 09c3ab9eefc3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesListByVirtualMachineSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of consoles for the provided virtual machine. - * - * @summary Get a list of consoles for the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_ListByVirtualMachine.json - */ -async function listConsolesOfTheVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.consoles.listByVirtualMachine( - resourceGroupName, - virtualMachineName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConsolesOfTheVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/consolesUpdateSample.ts deleted file mode 100644 index 45c35c2d0766..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/consolesUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ConsolePatchParameters, - ConsolesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Patch.json - */ -async function patchVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleUpdateParameters: ConsolePatchParameters = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ConsolesUpdateOptionalParams = { consoleUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - options, - ); - console.log(result); -} - -async function main() { - patchVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesCreateOrUpdateSample.ts deleted file mode 100644 index ac0651811c2a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - KubernetesClusterFeature, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * - * @summary Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Create.json - */ -async function createOrUpdateKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureParameters: KubernetesClusterFeature = { - location: "location", - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.kubernetesClusterFeatures.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - kubernetesClusterFeatureParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesDeleteSample.ts deleted file mode 100644 index 1a7aad6538cc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster feature. - * - * @summary Delete the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Delete.json - */ -async function deleteKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesGetSample.ts deleted file mode 100644 index f523f683a5d1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster feature. - * - * @summary Get properties of the provided the Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json - */ -async function getKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.get( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main() { - getKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesListByKubernetesClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesListByKubernetesClusterSample.ts deleted file mode 100644 index 5d856fd7fd8a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesListByKubernetesClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of features for the provided Kubernetes cluster. - * - * @summary Get a list of features for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json - */ -async function listFeaturesForTheKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusterFeatures.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listFeaturesForTheKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesUpdateSample.ts deleted file mode 100644 index 9066690dd962..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClusterFeaturesUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - KubernetesClusterFeaturePatchParameters, - KubernetesClusterFeaturesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of the provided Kubernetes cluster feature. - * - * @summary Patch properties of the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Patch.json - */ -async function patchKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureUpdateParameters: KubernetesClusterFeaturePatchParameters = - { - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: KubernetesClusterFeaturesUpdateOptionalParams = { - kubernetesClusterFeatureUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersCreateOrUpdateSample.ts deleted file mode 100644 index 19ed7ee379b4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { KubernetesCluster, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Create.json - */ -async function createOrUpdateKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters: KubernetesCluster = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_XXXX", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - bgpServiceLoadBalancerConfiguration: { - bgpAdvertisements: [ - { - advertiseToFabric: "True", - communities: ["64512:100"], - ipAddressPools: ["pool1"], - peers: ["peer1"], - }, - ], - bgpPeers: [ - { - name: "peer1", - bfdEnabled: "False", - bgpMultiHop: "False", - holdTime: "P300s", - keepAliveTime: "P300s", - myAsn: 64512, - peerAddress: "203.0.113.254", - peerAsn: 64497, - peerPort: 179, - }, - ], - fabricPeeringEnabled: "True", - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.0/24"], - autoAssign: "True", - onlyUseHostIps: "True", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_L2LoadBalancer_Create.json - */ -async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters: KubernetesCluster = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_XXXX", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - l2ServiceLoadBalancerConfiguration: { - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.2-198.51.102.254"], - autoAssign: "True", - }, - ], - }, - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesCluster(); - createOrUpdateKubernetesClusterWithALayer2LoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersDeleteSample.ts deleted file mode 100644 index 9ac3d0cb4448..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster. - * - * @summary Delete the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Delete.json - */ -async function deleteKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersGetSample.ts deleted file mode 100644 index b373918d3c43..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster. - * - * @summary Get properties of the provided the Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json - */ -async function getKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.get( - resourceGroupName, - kubernetesClusterName, - ); - console.log(result); -} - -async function main() { - getKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListByResourceGroupSample.ts deleted file mode 100644 index d82c55f07927..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided resource group. - * - * @summary Get a list of Kubernetes clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListByResourceGroup.json - */ -async function listKubernetesClustersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listKubernetesClustersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListBySubscriptionSample.ts deleted file mode 100644 index 1c194a841a0c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided subscription. - * - * @summary Get a list of Kubernetes clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListBySubscription.json - */ -async function listKubernetesClustersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listKubernetesClustersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersRestartNodeSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersRestartNodeSample.ts deleted file mode 100644 index 20ce002585cd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersRestartNodeSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - KubernetesClusterRestartNodeParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Restart a targeted node of a Kubernetes cluster. - * - * @summary Restart a targeted node of a Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_RestartNode.json - */ -async function restartAKubernetesClusterNode() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters = - { nodeName: "nodeName" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginRestartNodeAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterRestartNodeParameters, - ); - console.log(result); -} - -async function main() { - restartAKubernetesClusterNode(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersUpdateSample.ts deleted file mode 100644 index 2355f51f6e1a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/kubernetesClustersUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - KubernetesClusterPatchParameters, - KubernetesClustersUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Patch.json - */ -async function patchKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterUpdateParameters: KubernetesClusterPatchParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - }, - kubernetesVersion: "1.XX.Y", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: KubernetesClustersUpdateOptionalParams = { - kubernetesClusterUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksCreateOrUpdateSample.ts deleted file mode 100644 index 31bec9c2b227..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { L2Network, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new layer 2 (L2) network or update the properties of the existing network. - * - * @summary Create a new layer 2 (L2) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Create.json - */ -async function createOrUpdateL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkParameters: L2Network = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - hybridAksPluginType: "DPDK", - interfaceName: "eth0", - l2IsolationDomainId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l2NetworkName, - l2NetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksDeleteSample.ts deleted file mode 100644 index 37c1b4b6eedd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided layer 2 (L2) network. - * - * @summary Delete the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Delete.json - */ -async function deleteL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginDeleteAndWait( - resourceGroupName, - l2NetworkName, - ); - console.log(result); -} - -async function main() { - deleteL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksGetSample.ts deleted file mode 100644 index a0164a1024e9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided layer 2 (L2) network. - * - * @summary Get properties of the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json - */ -async function getL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.get(resourceGroupName, l2NetworkName); - console.log(result); -} - -async function main() { - getL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListByResourceGroupSample.ts deleted file mode 100644 index cce081fb9f82..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided resource group. - * - * @summary Get a list of layer 2 (L2) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListByResourceGroup.json - */ -async function listL2NetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l2Networks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL2NetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListBySubscriptionSample.ts deleted file mode 100644 index 97e4c5fd1ee4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided subscription. - * - * @summary Get a list of layer 2 (L2) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListBySubscription.json - */ -async function listL2NetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l2Networks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL2NetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksUpdateSample.ts deleted file mode 100644 index 5b774ff6c176..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l2NetworksUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - L2NetworkPatchParameters, - L2NetworksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update tags associated with the provided layer 2 (L2) network. - * - * @summary Update tags associated with the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Patch.json - */ -async function patchL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkUpdateParameters: L2NetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: L2NetworksUpdateOptionalParams = { l2NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.update( - resourceGroupName, - l2NetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksCreateOrUpdateSample.ts deleted file mode 100644 index c68e1554a0ea..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksCreateOrUpdateSample.ts +++ /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. -import { L3Network, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new layer 3 (L3) network or update the properties of the existing network. - * - * @summary Create a new layer 3 (L3) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Create.json - */ -async function createOrUpdateL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkParameters: L3Network = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - ipAllocationType: "DualStack", - ipv4ConnectedPrefix: "198.51.100.0/24", - ipv6ConnectedPrefix: "2001:db8::/64", - l3IsolationDomainId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlan: 12, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l3NetworkName, - l3NetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksDeleteSample.ts deleted file mode 100644 index 3beb09b522eb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided layer 3 (L3) network. - * - * @summary Delete the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Delete.json - */ -async function deleteL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginDeleteAndWait( - resourceGroupName, - l3NetworkName, - ); - console.log(result); -} - -async function main() { - deleteL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksGetSample.ts deleted file mode 100644 index 6c0bf9238e23..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided layer 3 (L3) network. - * - * @summary Get properties of the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json - */ -async function getL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.get(resourceGroupName, l3NetworkName); - console.log(result); -} - -async function main() { - getL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListByResourceGroupSample.ts deleted file mode 100644 index ef5ace2744b7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided resource group. - * - * @summary Get a list of layer 3 (L3) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListByResourceGroup.json - */ -async function listL3NetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l3Networks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL3NetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListBySubscriptionSample.ts deleted file mode 100644 index 40e7098f0c59..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided subscription. - * - * @summary Get a list of layer 3 (L3) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListBySubscription.json - */ -async function listL3NetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l3Networks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL3NetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksUpdateSample.ts deleted file mode 100644 index f4c5d4c6c08c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/l3NetworksUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - L3NetworkPatchParameters, - L3NetworksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update tags associated with the provided layer 3 (L3) network. - * - * @summary Update tags associated with the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Patch.json - */ -async function patchL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkUpdateParameters: L3NetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: L3NetworksUpdateOptionalParams = { l3NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.update( - resourceGroupName, - l3NetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 5fe9b61cf0c5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsCreateOrUpdateSample.ts +++ /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. -import { - ClusterMetricsConfiguration, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create new or update the existing metrics configuration of the provided cluster. - * - * @summary Create new or update the existing metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Create.json - */ -async function createOrUpdateMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationParameters: ClusterMetricsConfiguration = { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - metricsConfigurationParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsDeleteSample.ts deleted file mode 100644 index 59d304855e81..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the metrics configuration of the provided cluster. - * - * @summary Delete the metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Delete.json - */ -async function deleteMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginDeleteAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main() { - deleteMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsGetSample.ts deleted file mode 100644 index 73d0ae2712da..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get metrics configuration of the provided cluster. - * - * @summary Get metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json - */ -async function getMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.get( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main() { - getMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsListByClusterSample.ts deleted file mode 100644 index 71c61471d3d8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsListByClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of metrics configurations for the provided cluster. - * - * @summary Get a list of metrics configurations for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_ListByCluster.json - */ -async function listMetricsConfigurationsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricsConfigurations.listByCluster( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricsConfigurationsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsUpdateSample.ts deleted file mode 100644 index 4cdc8ee1ae35..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/metricsConfigurationsUpdateSample.ts +++ /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. -import { - ClusterMetricsConfigurationPatchParameters, - MetricsConfigurationsUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Patch.json - */ -async function patchMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationUpdateParameters: ClusterMetricsConfigurationPatchParameters = - { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: MetricsConfigurationsUpdateOptionalParams = { - metricsConfigurationUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - ); - console.log(result); -} - -async function main() { - patchMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/operationsListSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/operationsListSample.ts deleted file mode 100644 index 68353b739071..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * - * @summary Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Operations_List.json - */ -async function listResourceProviderOperations() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listResourceProviderOperations(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusGetSample.ts deleted file mode 100644 index e3f8ff2effeb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of the provided rack SKU. - * - * @summary Get the properties of the provided rack SKU. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json - */ -async function getRackSkuResource() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const rackSkuName = "rackSkuName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.rackSkus.get(rackSkuName); - console.log(result); -} - -async function main() { - getRackSkuResource(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusListBySubscriptionSample.ts deleted file mode 100644 index be1d7a2aefec..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/rackSkusListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of rack SKUs in the provided subscription. - * - * @summary Get a list of rack SKUs in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_ListBySubscription.json - */ -async function listRackSkUsForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.rackSkus.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRackSkUsForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksCreateOrUpdateSample.ts deleted file mode 100644 index 7412607e52bd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksCreateOrUpdateSample.ts +++ /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. -import { Rack, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new rack or update properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new rack or update properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Create.json - */ -async function createOrUpdateRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackParameters: Rack = { - availabilityZone: "1", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackLocation: "Rack 28", - rackSerialNumber: "RACK_SERIAL_NUMBER", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginCreateOrUpdateAndWait( - resourceGroupName, - rackName, - rackParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksDeleteSample.ts deleted file mode 100644 index 90376d4e75fa..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided rack. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided rack. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Delete.json - */ -async function deleteRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginDeleteAndWait( - resourceGroupName, - rackName, - ); - console.log(result); -} - -async function main() { - deleteRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksGetSample.ts deleted file mode 100644 index 88af1a48508f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided rack. - * - * @summary Get properties of the provided rack. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json - */ -async function getRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.get(resourceGroupName, rackName); - console.log(result); -} - -async function main() { - getRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksListByResourceGroupSample.ts deleted file mode 100644 index 2149fd803f10..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksListByResourceGroupSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of racks in the provided resource group. - * - * @summary Get a list of racks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListByResourceGroup.json - */ -async function listRacksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.racks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRacksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksListBySubscriptionSample.ts deleted file mode 100644 index 6ad4e42aeec6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of racks in the provided subscription. - * - * @summary Get a list of racks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListBySubscription.json - */ -async function listRacksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.racks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRacksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/racksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/racksUpdateSample.ts deleted file mode 100644 index 0127fe811192..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/racksUpdateSample.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 { - RackPatchParameters, - RacksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Patch.json - */ -async function patchRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackUpdateParameters: RackPatchParameters = { - rackLocation: "Rack 2B", - rackSerialNumber: "RACK_SERIAL_NUMBER", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: RacksUpdateOptionalParams = { rackUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginUpdateAndWait( - resourceGroupName, - rackName, - options, - ); - console.log(result); -} - -async function main() { - patchRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesCreateOrUpdateSample.ts deleted file mode 100644 index 44ec1a8ad608..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { StorageAppliance, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new storage appliance or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new storage appliance or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Create.json - */ -async function createOrUpdateStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceParameters: StorageAppliance = { - administratorCredentials: { password: "{password}", username: "adminUser" }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceSkuId: "684E-3B16-399E", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDeleteSample.ts deleted file mode 100644 index d507feb3877f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided storage appliance. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided storage appliance. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Delete.json - */ -async function deleteStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginDeleteAndWait( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - deleteStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDisableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDisableRemoteVendorManagementSample.ts deleted file mode 100644 index a3768dc42274..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesDisableRemoteVendorManagementSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Disable remote vendor management of the provided storage appliance. - * - * @summary Disable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_DisableRemoteVendorManagement.json - */ -async function turnOffRemoteVendorManagementForStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.storageAppliances.beginDisableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - turnOffRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesEnableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesEnableRemoteVendorManagementSample.ts deleted file mode 100644 index 47ae73681018..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesEnableRemoteVendorManagementSample.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 { - StorageApplianceEnableRemoteVendorManagementParameters, - StorageAppliancesEnableRemoteVendorManagementOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Enable remote vendor management of the provided storage appliance. - * - * @summary Enable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_EnableRemoteVendorManagement.json - */ -async function turnOnRemoteVendorManagementForStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceEnableRemoteVendorManagementParameters: StorageApplianceEnableRemoteVendorManagementParameters = - { supportEndpoints: ["10.0.0.0/24"] }; - const options: StorageAppliancesEnableRemoteVendorManagementOptionalParams = { - storageApplianceEnableRemoteVendorManagementParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.storageAppliances.beginEnableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main() { - turnOnRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesGetSample.ts deleted file mode 100644 index 9fafa9fb064c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided storage appliance. - * - * @summary Get properties of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json - */ -async function getStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.get( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - getStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListByResourceGroupSample.ts deleted file mode 100644 index 1cd278e26780..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of storage appliances in the provided resource group. - * - * @summary Get a list of storage appliances in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListByResourceGroup.json - */ -async function listStorageAppliancesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageAppliances.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageAppliancesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListBySubscriptionSample.ts deleted file mode 100644 index 6b50c519f6b1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of storage appliances in the provided subscription. - * - * @summary Get a list of storage appliances in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListBySubscription.json - */ -async function listStorageAppliancesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageAppliances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageAppliancesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesUpdateSample.ts deleted file mode 100644 index 65a42d54e8e1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/storageAppliancesUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - StorageAppliancePatchParameters, - StorageAppliancesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * - * @summary Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Patch.json - */ -async function patchStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceUpdateParameters: StorageAppliancePatchParameters = { - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: StorageAppliancesUpdateOptionalParams = { - storageApplianceUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginUpdateAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main() { - patchStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 002ecbff0210..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { TrunkedNetwork, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new trunked network or update the properties of the existing trunked network. - * - * @summary Create a new trunked network or update the properties of the existing trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Create.json - */ -async function createOrUpdateTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkParameters: TrunkedNetwork = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - isolationDomainIds: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - ], - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlans: [12, 14], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - trunkedNetworkName, - trunkedNetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksDeleteSample.ts deleted file mode 100644 index e18a0529774a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided trunked network. - * - * @summary Delete the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Delete.json - */ -async function deleteTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginDeleteAndWait( - resourceGroupName, - trunkedNetworkName, - ); - console.log(result); -} - -async function main() { - deleteTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksGetSample.ts deleted file mode 100644 index f2b5e9a4c810..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided trunked network. - * - * @summary Get properties of the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json - */ -async function getTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.get( - resourceGroupName, - trunkedNetworkName, - ); - console.log(result); -} - -async function main() { - getTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListByResourceGroupSample.ts deleted file mode 100644 index 5a184c74e367..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of trunked networks in the provided resource group. - * - * @summary Get a list of trunked networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListByResourceGroup.json - */ -async function listTrunkedNetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.trunkedNetworks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listTrunkedNetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListBySubscriptionSample.ts deleted file mode 100644 index e8259d15f164..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of trunked networks in the provided subscription. - * - * @summary Get a list of trunked networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListBySubscription.json - */ -async function listTrunkedNetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.trunkedNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listTrunkedNetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksUpdateSample.ts deleted file mode 100644 index 207a9c3ed034..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/trunkedNetworksUpdateSample.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 { - TrunkedNetworkPatchParameters, - TrunkedNetworksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update tags associated with the provided trunked network. - * - * @summary Update tags associated with the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Patch.json - */ -async function patchTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkUpdateParameters: TrunkedNetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: TrunkedNetworksUpdateOptionalParams = { - trunkedNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.update( - resourceGroupName, - trunkedNetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesCreateOrUpdateSample.ts deleted file mode 100644 index 16e1e2e95c95..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesCreateOrUpdateSample.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachine, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new virtual machine or update the properties of the existing virtual machine. - * - * @summary Create a new virtual machine or update the properties of the existing virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Create.json - */ -async function createOrUpdateVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineParameters: VirtualMachine = { - adminUsername: "username", - bootMethod: "UEFI", - cloudServicesNetworkAttachment: { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - ipAllocationMethod: "Dynamic", - }, - cpuCores: 2, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - memorySizeGB: 8, - networkAttachments: [ - { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - defaultGateway: "True", - ipAllocationMethod: "Dynamic", - ipv4Address: "198.51.100.1", - ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", - networkAttachmentName: "netAttachName01", - }, - ], - networkData: "bmV0d29ya0RhdGVTYW1wbGU=", - placementHints: [ - { - hintType: "Affinity", - resourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - schedulingExecution: "Hard", - scope: "", - }, - ], - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - storageProfile: { - osDisk: { - createOption: "Ephemeral", - deleteOption: "Delete", - diskSizeGB: 120, - }, - volumeAttachments: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", - ], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - userData: "dXNlckRhdGVTYW1wbGU=", - vmDeviceModel: "T2", - vmImage: "myacr.azurecr.io/foobar:latest", - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - virtualMachineParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesDeleteSample.ts deleted file mode 100644 index 2554394d6ebe..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided virtual machine. - * - * @summary Delete the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Delete.json - */ -async function deleteVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - deleteVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesGetSample.ts deleted file mode 100644 index 229cb0ff9010..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided virtual machine. - * - * @summary Get properties of the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json - */ -async function getVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.get( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - getVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListByResourceGroupSample.ts deleted file mode 100644 index 0031a31b1973..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of virtual machines in the provided resource group. - * - * @summary Get a list of virtual machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListByResourceGroup.json - */ -async function listVirtualMachinesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListBySubscriptionSample.ts deleted file mode 100644 index 0e6ac5e7fb12..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of virtual machines in the provided subscription. - * - * @summary Get a list of virtual machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListBySubscription.json - */ -async function listVirtualMachinesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesPowerOffSample.ts deleted file mode 100644 index c3a9b1dd89ea..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesPowerOffSample.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 { - VirtualMachinePowerOffParameters, - VirtualMachinesPowerOffOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Power off the provided virtual machine. - * - * @summary Power off the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_PowerOff.json - */ -async function powerOffVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachinePowerOffParameters: VirtualMachinePowerOffParameters = { - skipShutdown: "True", - }; - const options: VirtualMachinesPowerOffOptionalParams = { - virtualMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginPowerOffAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - powerOffVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesReimageSample.ts deleted file mode 100644 index 46f8cf3aeb7c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesReimageSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Reimage the provided virtual machine. - * - * @summary Reimage the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Reimage.json - */ -async function reimageVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginReimageAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - reimageVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesRestartSample.ts deleted file mode 100644 index 07933531d444..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesRestartSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Restart the provided virtual machine. - * - * @summary Restart the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Restart.json - */ -async function restartVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - restartVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesStartSample.ts deleted file mode 100644 index 6f8b0a3a5696..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesStartSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start the provided virtual machine. - * - * @summary Start the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Start.json - */ -async function startVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - startVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesUpdateSample.ts deleted file mode 100644 index 5bbe8699eee7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/virtualMachinesUpdateSample.ts +++ /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. -import { - VirtualMachinePatchParameters, - VirtualMachinesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Patch.json - */ -async function patchVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineUpdateParameters: VirtualMachinePatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const options: VirtualMachinesUpdateOptionalParams = { - virtualMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - patchVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesCreateOrUpdateSample.ts deleted file mode 100644 index 8ef7a264a3d6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Volume, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new volume or update the properties of the existing one. - * - * @summary Create a new volume or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Create.json - */ -async function createOrUpdateVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeParameters: Volume = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sizeMiB: 10000, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginCreateOrUpdateAndWait( - resourceGroupName, - volumeName, - volumeParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesDeleteSample.ts deleted file mode 100644 index 714bbc1b5e3d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided volume. - * - * @summary Delete the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Delete.json - */ -async function deleteVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginDeleteAndWait( - resourceGroupName, - volumeName, - ); - console.log(result); -} - -async function main() { - deleteVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesGetSample.ts deleted file mode 100644 index ba640c877a79..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided volume. - * - * @summary Get properties of the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json - */ -async function getVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.get(resourceGroupName, volumeName); - console.log(result); -} - -async function main() { - getVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListByResourceGroupSample.ts deleted file mode 100644 index 06d74ab0501a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of volumes in the provided resource group. - * - * @summary Get a list of volumes in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListByResourceGroup.json - */ -async function listVolumesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.volumes.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVolumesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListBySubscriptionSample.ts deleted file mode 100644 index dfcc9e784087..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of volumes in the provided subscription. - * - * @summary Get a list of volumes in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListBySubscription.json - */ -async function listVolumeForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.volumes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVolumeForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples-dev/volumesUpdateSample.ts deleted file mode 100644 index 26ea1bc26850..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples-dev/volumesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VolumePatchParameters, - VolumesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update tags associated with the provided volume. - * - * @summary Update tags associated with the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Patch.json - */ -async function patchVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeUpdateParameters: VolumePatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: VolumesUpdateOptionalParams = { volumeUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.update( - resourceGroupName, - volumeName, - options, - ); - console.log(result); -} - -async function main() { - patchVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/README.md b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/README.md deleted file mode 100644 index 4e56112a915b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/README.md +++ /dev/null @@ -1,300 +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** | -| ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolsCreateOrUpdateSample.js][agentpoolscreateorupdatesample] | Create a new Kubernetes cluster agent pool or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Create.json | -| [agentPoolsDeleteSample.js][agentpoolsdeletesample] | Delete the provided Kubernetes cluster agent pool. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Delete.json | -| [agentPoolsGetSample.js][agentpoolsgetsample] | Get properties of the provided Kubernetes cluster agent pool. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json | -| [agentPoolsListByKubernetesClusterSample.js][agentpoolslistbykubernetesclustersample] | Get a list of agent pools for the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_ListByKubernetesCluster.json | -| [agentPoolsUpdateSample.js][agentpoolsupdatesample] | Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Patch.json | -| [bareMetalMachineKeySetsCreateOrUpdateSample.js][baremetalmachinekeysetscreateorupdatesample] | Create a new bare metal machine key set or update the existing one for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Create.json | -| [bareMetalMachineKeySetsDeleteSample.js][baremetalmachinekeysetsdeletesample] | Delete the bare metal machine key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Delete.json | -| [bareMetalMachineKeySetsGetSample.js][baremetalmachinekeysetsgetsample] | Get bare metal machine key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json | -| [bareMetalMachineKeySetsListByClusterSample.js][baremetalmachinekeysetslistbyclustersample] | Get a list of bare metal machine key sets for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_ListByCluster.json | -| [bareMetalMachineKeySetsUpdateSample.js][baremetalmachinekeysetsupdatesample] | Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Patch.json | -| [bareMetalMachinesCordonSample.js][baremetalmachinescordonsample] | Cordon the provided bare metal machine's Kubernetes node. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Cordon.json | -| [bareMetalMachinesCreateOrUpdateSample.js][baremetalmachinescreateorupdatesample] | Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Create.json | -| [bareMetalMachinesDeleteSample.js][baremetalmachinesdeletesample] | Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Delete.json | -| [bareMetalMachinesGetSample.js][baremetalmachinesgetsample] | Get properties of the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json | -| [bareMetalMachinesListByResourceGroupSample.js][baremetalmachineslistbyresourcegroupsample] | Get a list of bare metal machines in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListByResourceGroup.json | -| [bareMetalMachinesListBySubscriptionSample.js][baremetalmachineslistbysubscriptionsample] | Get a list of bare metal machines in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListBySubscription.json | -| [bareMetalMachinesPowerOffSample.js][baremetalmachinespoweroffsample] | Power off the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_PowerOff.json | -| [bareMetalMachinesReimageSample.js][baremetalmachinesreimagesample] | Reimage the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Reimage.json | -| [bareMetalMachinesReplaceSample.js][baremetalmachinesreplacesample] | Replace the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Replace.json | -| [bareMetalMachinesRestartSample.js][baremetalmachinesrestartsample] | Restart the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Restart.json | -| [bareMetalMachinesRunCommandSample.js][baremetalmachinesruncommandsample] | Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunCommand.json | -| [bareMetalMachinesRunDataExtractsSample.js][baremetalmachinesrundataextractssample] | Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunDataExtracts.json | -| [bareMetalMachinesRunReadCommandsSample.js][baremetalmachinesrunreadcommandssample] | Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunReadCommands.json | -| [bareMetalMachinesStartSample.js][baremetalmachinesstartsample] | Start the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Start.json | -| [bareMetalMachinesUncordonSample.js][baremetalmachinesuncordonsample] | Uncordon the provided bare metal machine's Kubernetes node. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Uncordon.json | -| [bareMetalMachinesUpdateSample.js][baremetalmachinesupdatesample] | Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Patch.json | -| [bmcKeySetsCreateOrUpdateSample.js][bmckeysetscreateorupdatesample] | Create a new baseboard management controller key set or update the existing one for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Create.json | -| [bmcKeySetsDeleteSample.js][bmckeysetsdeletesample] | Delete the baseboard management controller key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Delete.json | -| [bmcKeySetsGetSample.js][bmckeysetsgetsample] | Get baseboard management controller key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json | -| [bmcKeySetsListByClusterSample.js][bmckeysetslistbyclustersample] | Get a list of baseboard management controller key sets for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_ListByCluster.json | -| [bmcKeySetsUpdateSample.js][bmckeysetsupdatesample] | Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Patch.json | -| [cloudServicesNetworksCreateOrUpdateSample.js][cloudservicesnetworkscreateorupdatesample] | Create a new cloud services network or update the properties of the existing cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Create.json | -| [cloudServicesNetworksDeleteSample.js][cloudservicesnetworksdeletesample] | Delete the provided cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Delete.json | -| [cloudServicesNetworksGetSample.js][cloudservicesnetworksgetsample] | Get properties of the provided cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json | -| [cloudServicesNetworksListByResourceGroupSample.js][cloudservicesnetworkslistbyresourcegroupsample] | Get a list of cloud services networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListByResourceGroup.json | -| [cloudServicesNetworksListBySubscriptionSample.js][cloudservicesnetworkslistbysubscriptionsample] | Get a list of cloud services networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListBySubscription.json | -| [cloudServicesNetworksUpdateSample.js][cloudservicesnetworksupdatesample] | Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Patch.json | -| [clusterManagersCreateOrUpdateSample.js][clustermanagerscreateorupdatesample] | Create a new cluster manager or update properties of the cluster manager if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create.json | -| [clusterManagersDeleteSample.js][clustermanagersdeletesample] | Delete the provided cluster manager. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Delete.json | -| [clusterManagersGetSample.js][clustermanagersgetsample] | Get the properties of the provided cluster manager. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json | -| [clusterManagersListByResourceGroupSample.js][clustermanagerslistbyresourcegroupsample] | Get a list of cluster managers in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListByResourceGroup.json | -| [clusterManagersListBySubscriptionSample.js][clustermanagerslistbysubscriptionsample] | Get a list of cluster managers in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListBySubscription.json | -| [clusterManagersUpdateSample.js][clustermanagersupdatesample] | Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Patch.json | -| [clustersContinueUpdateVersionSample.js][clusterscontinueupdateversionsample] | Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ContinueUpdateVersion.json | -| [clustersCreateOrUpdateSample.js][clusterscreateorupdatesample] | Create a new cluster or update the properties of the cluster if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Create.json | -| [clustersDeleteSample.js][clustersdeletesample] | Delete the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Delete.json | -| [clustersDeploySample.js][clustersdeploysample] | Deploy the cluster using the rack configuration provided during creation. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy.json | -| [clustersGetSample.js][clustersgetsample] | Get properties of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json | -| [clustersListByResourceGroupSample.js][clusterslistbyresourcegroupsample] | Get a list of clusters in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListByResourceGroup.json | -| [clustersListBySubscriptionSample.js][clusterslistbysubscriptionsample] | Get a list of clusters in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListBySubscription.json | -| [clustersScanRuntimeSample.js][clustersscanruntimesample] | Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ScanRuntime.json | -| [clustersUpdateSample.js][clustersupdatesample] | Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json | -| [clustersUpdateVersionSample.js][clustersupdateversionsample] | Update the version of the provided cluster to one of the available supported versions. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_UpdateVersion.json | -| [consolesCreateOrUpdateSample.js][consolescreateorupdatesample] | Create a new virtual machine console or update the properties of the existing virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Create.json | -| [consolesDeleteSample.js][consolesdeletesample] | Delete the provided virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Delete.json | -| [consolesGetSample.js][consolesgetsample] | Get properties of the provided virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json | -| [consolesListByVirtualMachineSample.js][consoleslistbyvirtualmachinesample] | Get a list of consoles for the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_ListByVirtualMachine.json | -| [consolesUpdateSample.js][consolesupdatesample] | Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Patch.json | -| [kubernetesClusterFeaturesCreateOrUpdateSample.js][kubernetesclusterfeaturescreateorupdatesample] | Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Create.json | -| [kubernetesClusterFeaturesDeleteSample.js][kubernetesclusterfeaturesdeletesample] | Delete the provided Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Delete.json | -| [kubernetesClusterFeaturesGetSample.js][kubernetesclusterfeaturesgetsample] | Get properties of the provided the Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json | -| [kubernetesClusterFeaturesListByKubernetesClusterSample.js][kubernetesclusterfeatureslistbykubernetesclustersample] | Get a list of features for the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json | -| [kubernetesClusterFeaturesUpdateSample.js][kubernetesclusterfeaturesupdatesample] | Patch properties of the provided Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Patch.json | -| [kubernetesClustersCreateOrUpdateSample.js][kubernetesclusterscreateorupdatesample] | Create a new Kubernetes cluster or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Create.json | -| [kubernetesClustersDeleteSample.js][kubernetesclustersdeletesample] | Delete the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Delete.json | -| [kubernetesClustersGetSample.js][kubernetesclustersgetsample] | Get properties of the provided the Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json | -| [kubernetesClustersListByResourceGroupSample.js][kubernetesclusterslistbyresourcegroupsample] | Get a list of Kubernetes clusters in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListByResourceGroup.json | -| [kubernetesClustersListBySubscriptionSample.js][kubernetesclusterslistbysubscriptionsample] | Get a list of Kubernetes clusters in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListBySubscription.json | -| [kubernetesClustersRestartNodeSample.js][kubernetesclustersrestartnodesample] | Restart a targeted node of a Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_RestartNode.json | -| [kubernetesClustersUpdateSample.js][kubernetesclustersupdatesample] | Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Patch.json | -| [l2NetworksCreateOrUpdateSample.js][l2networkscreateorupdatesample] | Create a new layer 2 (L2) network or update the properties of the existing network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Create.json | -| [l2NetworksDeleteSample.js][l2networksdeletesample] | Delete the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Delete.json | -| [l2NetworksGetSample.js][l2networksgetsample] | Get properties of the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json | -| [l2NetworksListByResourceGroupSample.js][l2networkslistbyresourcegroupsample] | Get a list of layer 2 (L2) networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListByResourceGroup.json | -| [l2NetworksListBySubscriptionSample.js][l2networkslistbysubscriptionsample] | Get a list of layer 2 (L2) networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListBySubscription.json | -| [l2NetworksUpdateSample.js][l2networksupdatesample] | Update tags associated with the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Patch.json | -| [l3NetworksCreateOrUpdateSample.js][l3networkscreateorupdatesample] | Create a new layer 3 (L3) network or update the properties of the existing network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Create.json | -| [l3NetworksDeleteSample.js][l3networksdeletesample] | Delete the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Delete.json | -| [l3NetworksGetSample.js][l3networksgetsample] | Get properties of the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json | -| [l3NetworksListByResourceGroupSample.js][l3networkslistbyresourcegroupsample] | Get a list of layer 3 (L3) networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListByResourceGroup.json | -| [l3NetworksListBySubscriptionSample.js][l3networkslistbysubscriptionsample] | Get a list of layer 3 (L3) networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListBySubscription.json | -| [l3NetworksUpdateSample.js][l3networksupdatesample] | Update tags associated with the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Patch.json | -| [metricsConfigurationsCreateOrUpdateSample.js][metricsconfigurationscreateorupdatesample] | Create new or update the existing metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Create.json | -| [metricsConfigurationsDeleteSample.js][metricsconfigurationsdeletesample] | Delete the metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Delete.json | -| [metricsConfigurationsGetSample.js][metricsconfigurationsgetsample] | Get metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json | -| [metricsConfigurationsListByClusterSample.js][metricsconfigurationslistbyclustersample] | Get a list of metrics configurations for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_ListByCluster.json | -| [metricsConfigurationsUpdateSample.js][metricsconfigurationsupdatesample] | Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Patch.json | -| [operationsListSample.js][operationslistsample] | Get a list of all available resource provider operations. It contains a URL link to get the next set of results. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Operations_List.json | -| [rackSkusGetSample.js][rackskusgetsample] | Get the properties of the provided rack SKU. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json | -| [rackSkusListBySubscriptionSample.js][rackskuslistbysubscriptionsample] | Get a list of rack SKUs in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_ListBySubscription.json | -| [racksCreateOrUpdateSample.js][rackscreateorupdatesample] | Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Create.json | -| [racksDeleteSample.js][racksdeletesample] | Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Delete.json | -| [racksGetSample.js][racksgetsample] | Get properties of the provided rack. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json | -| [racksListByResourceGroupSample.js][rackslistbyresourcegroupsample] | Get a list of racks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListByResourceGroup.json | -| [racksListBySubscriptionSample.js][rackslistbysubscriptionsample] | Get a list of racks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListBySubscription.json | -| [racksUpdateSample.js][racksupdatesample] | Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Patch.json | -| [storageAppliancesCreateOrUpdateSample.js][storageappliancescreateorupdatesample] | Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Create.json | -| [storageAppliancesDeleteSample.js][storageappliancesdeletesample] | Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Delete.json | -| [storageAppliancesDisableRemoteVendorManagementSample.js][storageappliancesdisableremotevendormanagementsample] | Disable remote vendor management of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_DisableRemoteVendorManagement.json | -| [storageAppliancesEnableRemoteVendorManagementSample.js][storageappliancesenableremotevendormanagementsample] | Enable remote vendor management of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_EnableRemoteVendorManagement.json | -| [storageAppliancesGetSample.js][storageappliancesgetsample] | Get properties of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json | -| [storageAppliancesListByResourceGroupSample.js][storageapplianceslistbyresourcegroupsample] | Get a list of storage appliances in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListByResourceGroup.json | -| [storageAppliancesListBySubscriptionSample.js][storageapplianceslistbysubscriptionsample] | Get a list of storage appliances in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListBySubscription.json | -| [storageAppliancesUpdateSample.js][storageappliancesupdatesample] | Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Patch.json | -| [trunkedNetworksCreateOrUpdateSample.js][trunkednetworkscreateorupdatesample] | Create a new trunked network or update the properties of the existing trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Create.json | -| [trunkedNetworksDeleteSample.js][trunkednetworksdeletesample] | Delete the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Delete.json | -| [trunkedNetworksGetSample.js][trunkednetworksgetsample] | Get properties of the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json | -| [trunkedNetworksListByResourceGroupSample.js][trunkednetworkslistbyresourcegroupsample] | Get a list of trunked networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListByResourceGroup.json | -| [trunkedNetworksListBySubscriptionSample.js][trunkednetworkslistbysubscriptionsample] | Get a list of trunked networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListBySubscription.json | -| [trunkedNetworksUpdateSample.js][trunkednetworksupdatesample] | Update tags associated with the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Patch.json | -| [virtualMachinesCreateOrUpdateSample.js][virtualmachinescreateorupdatesample] | Create a new virtual machine or update the properties of the existing virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Create.json | -| [virtualMachinesDeleteSample.js][virtualmachinesdeletesample] | Delete the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Delete.json | -| [virtualMachinesGetSample.js][virtualmachinesgetsample] | Get properties of the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json | -| [virtualMachinesListByResourceGroupSample.js][virtualmachineslistbyresourcegroupsample] | Get a list of virtual machines in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListByResourceGroup.json | -| [virtualMachinesListBySubscriptionSample.js][virtualmachineslistbysubscriptionsample] | Get a list of virtual machines in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListBySubscription.json | -| [virtualMachinesPowerOffSample.js][virtualmachinespoweroffsample] | Power off the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_PowerOff.json | -| [virtualMachinesReimageSample.js][virtualmachinesreimagesample] | Reimage the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Reimage.json | -| [virtualMachinesRestartSample.js][virtualmachinesrestartsample] | Restart the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Restart.json | -| [virtualMachinesStartSample.js][virtualmachinesstartsample] | Start the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Start.json | -| [virtualMachinesUpdateSample.js][virtualmachinesupdatesample] | Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Patch.json | -| [volumesCreateOrUpdateSample.js][volumescreateorupdatesample] | Create a new volume or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Create.json | -| [volumesDeleteSample.js][volumesdeletesample] | Delete the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Delete.json | -| [volumesGetSample.js][volumesgetsample] | Get properties of the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json | -| [volumesListByResourceGroupSample.js][volumeslistbyresourcegroupsample] | Get a list of volumes in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListByResourceGroup.json | -| [volumesListBySubscriptionSample.js][volumeslistbysubscriptionsample] | Get a list of volumes in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListBySubscription.json | -| [volumesUpdateSample.js][volumesupdatesample] | Update tags associated with the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Patch.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node agentPoolsCreateOrUpdateSample.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 dev-tool run vendored cross-env NETWORKCLOUD_SUBSCRIPTION_ID="" NETWORKCLOUD_RESOURCE_GROUP="" node agentPoolsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[agentpoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsCreateOrUpdateSample.js -[agentpoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsDeleteSample.js -[agentpoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsGetSample.js -[agentpoolslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsListByKubernetesClusterSample.js -[agentpoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsUpdateSample.js -[baremetalmachinekeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js -[baremetalmachinekeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsDeleteSample.js -[baremetalmachinekeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsGetSample.js -[baremetalmachinekeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsListByClusterSample.js -[baremetalmachinekeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsUpdateSample.js -[baremetalmachinescordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCordonSample.js -[baremetalmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCreateOrUpdateSample.js -[baremetalmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesDeleteSample.js -[baremetalmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesGetSample.js -[baremetalmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListByResourceGroupSample.js -[baremetalmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListBySubscriptionSample.js -[baremetalmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesPowerOffSample.js -[baremetalmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReimageSample.js -[baremetalmachinesreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReplaceSample.js -[baremetalmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRestartSample.js -[baremetalmachinesruncommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunCommandSample.js -[baremetalmachinesrundataextractssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsSample.js -[baremetalmachinesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunReadCommandsSample.js -[baremetalmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesStartSample.js -[baremetalmachinesuncordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUncordonSample.js -[baremetalmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUpdateSample.js -[bmckeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsCreateOrUpdateSample.js -[bmckeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsDeleteSample.js -[bmckeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsGetSample.js -[bmckeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsListByClusterSample.js -[bmckeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsUpdateSample.js -[cloudservicesnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksCreateOrUpdateSample.js -[cloudservicesnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksDeleteSample.js -[cloudservicesnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksGetSample.js -[cloudservicesnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListByResourceGroupSample.js -[cloudservicesnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListBySubscriptionSample.js -[cloudservicesnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksUpdateSample.js -[clustermanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersCreateOrUpdateSample.js -[clustermanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersDeleteSample.js -[clustermanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersGetSample.js -[clustermanagerslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListByResourceGroupSample.js -[clustermanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListBySubscriptionSample.js -[clustermanagersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateSample.js -[clusterscontinueupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersContinueUpdateVersionSample.js -[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersCreateOrUpdateSample.js -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeleteSample.js -[clustersdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeploySample.js -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersGetSample.js -[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListByResourceGroupSample.js -[clusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListBySubscriptionSample.js -[clustersscanruntimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersScanRuntimeSample.js -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateSample.js -[clustersupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateVersionSample.js -[consolescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesCreateOrUpdateSample.js -[consolesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesDeleteSample.js -[consolesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesGetSample.js -[consoleslistbyvirtualmachinesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesListByVirtualMachineSample.js -[consolesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesUpdateSample.js -[kubernetesclusterfeaturescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js -[kubernetesclusterfeaturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesDeleteSample.js -[kubernetesclusterfeaturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesGetSample.js -[kubernetesclusterfeatureslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js -[kubernetesclusterfeaturesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesUpdateSample.js -[kubernetesclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersCreateOrUpdateSample.js -[kubernetesclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersDeleteSample.js -[kubernetesclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersGetSample.js -[kubernetesclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListByResourceGroupSample.js -[kubernetesclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListBySubscriptionSample.js -[kubernetesclustersrestartnodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersRestartNodeSample.js -[kubernetesclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersUpdateSample.js -[l2networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksCreateOrUpdateSample.js -[l2networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksDeleteSample.js -[l2networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksGetSample.js -[l2networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListByResourceGroupSample.js -[l2networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListBySubscriptionSample.js -[l2networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksUpdateSample.js -[l3networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksCreateOrUpdateSample.js -[l3networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksDeleteSample.js -[l3networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksGetSample.js -[l3networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListByResourceGroupSample.js -[l3networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListBySubscriptionSample.js -[l3networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksUpdateSample.js -[metricsconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsCreateOrUpdateSample.js -[metricsconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsDeleteSample.js -[metricsconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsGetSample.js -[metricsconfigurationslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsListByClusterSample.js -[metricsconfigurationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsUpdateSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/operationsListSample.js -[rackskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusGetSample.js -[rackskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusListBySubscriptionSample.js -[rackscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksCreateOrUpdateSample.js -[racksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksDeleteSample.js -[racksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksGetSample.js -[rackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListByResourceGroupSample.js -[rackslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListBySubscriptionSample.js -[racksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksUpdateSample.js -[storageappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesCreateOrUpdateSample.js -[storageappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDeleteSample.js -[storageappliancesdisableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDisableRemoteVendorManagementSample.js -[storageappliancesenableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesEnableRemoteVendorManagementSample.js -[storageappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesGetSample.js -[storageapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListByResourceGroupSample.js -[storageapplianceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListBySubscriptionSample.js -[storageappliancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesUpdateSample.js -[trunkednetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksCreateOrUpdateSample.js -[trunkednetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksDeleteSample.js -[trunkednetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksGetSample.js -[trunkednetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListByResourceGroupSample.js -[trunkednetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListBySubscriptionSample.js -[trunkednetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksUpdateSample.js -[virtualmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesCreateOrUpdateSample.js -[virtualmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesDeleteSample.js -[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesGetSample.js -[virtualmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListByResourceGroupSample.js -[virtualmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListBySubscriptionSample.js -[virtualmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesPowerOffSample.js -[virtualmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesReimageSample.js -[virtualmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesRestartSample.js -[virtualmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesStartSample.js -[virtualmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesUpdateSample.js -[volumescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesCreateOrUpdateSample.js -[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesDeleteSample.js -[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesGetSample.js -[volumeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListByResourceGroupSample.js -[volumeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListBySubscriptionSample.js -[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesUpdateSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/README.md diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsCreateOrUpdateSample.js deleted file mode 100644 index 2a31cf7a3bcd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsCreateOrUpdateSample.js +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Create.json - */ -async function createOrUpdateKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolParameters = { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - labels: [{ key: "kubernetes.label", value: "true" }], - location: "location", - mode: "System", - tags: { key1: "myvalue1", key2: "myvalue2" }, - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - agentPoolParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsDeleteSample.js deleted file mode 100644 index 64dba6a6e5a9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster agent pool. - * - * @summary Delete the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Delete.json - */ -async function deleteKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsGetSample.js deleted file mode 100644 index ffd7e74912c0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided Kubernetes cluster agent pool. - * - * @summary Get properties of the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json - */ -async function getKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.get( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main() { - getKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsListByKubernetesClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsListByKubernetesClusterSample.js deleted file mode 100644 index 58bf7291d274..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsListByKubernetesClusterSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of agent pools for the provided Kubernetes cluster. - * - * @summary Get a list of agent pools for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_ListByKubernetesCluster.json - */ -async function listAgentPoolsOfTheKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.agentPools.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAgentPoolsOfTheKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsUpdateSample.js deleted file mode 100644 index 31b69bdd30ae..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/agentPoolsUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Patch.json - */ -async function patchKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolUpdateParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - tags: { key1: "myvalue1", key2: "myvalue2" }, - upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, - }; - const options = { agentPoolUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js deleted file mode 100644 index 421d786c9308..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsCreateOrUpdateSample.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new bare metal machine key set or update the existing one for the provided cluster. - * - * @summary Create a new bare metal machine key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Create.json - */ -async function createOrUpdateBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetParameters = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - location: "location", - osGroupName: "standardAccessGroup", - privilegeLevel: "Standard", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - bareMetalMachineKeySetParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsDeleteSample.js deleted file mode 100644 index 73e9f49332d7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the bare metal machine key set of the provided cluster. - * - * @summary Delete the bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Delete.json - */ -async function deleteBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main() { - deleteBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsGetSample.js deleted file mode 100644 index 79cd5e6759d5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get bare metal machine key set of the provided cluster. - * - * @summary Get bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json - */ -async function getBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.get( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main() { - getBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsListByClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsListByClusterSample.js deleted file mode 100644 index eda662a15174..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsListByClusterSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of bare metal machine key sets for the provided cluster. - * - * @summary Get a list of bare metal machine key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_ListByCluster.json - */ -async function listBareMetalMachineKeySetsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachineKeySets.listByCluster( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachineKeySetsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsUpdateSample.js deleted file mode 100644 index 5839c8c83e70..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachineKeySetsUpdateSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Patch.json - */ -async function patchBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetUpdateParameters = { - expiration: new Date("2022-12-31T23:59:59.008Z"), - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options = { - bareMetalMachineKeySetUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - ); - console.log(result); -} - -async function main() { - patchBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCordonSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCordonSample.js deleted file mode 100644 index a837a5e95efd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCordonSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Cordon the provided bare metal machine's Kubernetes node. - * - * @summary Cordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Cordon.json - */ -async function cordonBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineCordonParameters = { - evacuate: "True", - }; - const options = { - bareMetalMachineCordonParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCordonAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - cordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCreateOrUpdateSample.js deleted file mode 100644 index a3a210f8ded6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesCreateOrUpdateSample.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new bare metal machine or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new bare metal machine or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Create.json - */ -async function createOrUpdateBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineParameters = { - bmcConnectionString: "bmcconnectionstring", - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:00", - bootMacAddress: "00:00:4e:00:58:af", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - machineDetails: "User-provided machine details.", - machineName: "r01c001", - machineSkuId: "684E-3B16-399E", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesDeleteSample.js deleted file mode 100644 index 23df4afdebf1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided bare metal machine. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided bare metal machine. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Delete.json - */ -async function deleteBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginDeleteAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - deleteBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesGetSample.js deleted file mode 100644 index 157c0e53da13..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided bare metal machine. - * - * @summary Get properties of the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json - */ -async function getBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.get(resourceGroupName, bareMetalMachineName); - console.log(result); -} - -async function main() { - getBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListByResourceGroupSample.js deleted file mode 100644 index b50a5447dc66..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of bare metal machines in the provided resource group. - * - * @summary Get a list of bare metal machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListByResourceGroup.json - */ -async function listBareMetalMachinesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachines.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachinesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListBySubscriptionSample.js deleted file mode 100644 index ea4a45c427a3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of bare metal machines in the provided subscription. - * - * @summary Get a list of bare metal machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListBySubscription.json - */ -async function listBareMetalMachinesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachines.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachinesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesPowerOffSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesPowerOffSample.js deleted file mode 100644 index 43cdc0ae6288..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesPowerOffSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Power off the provided bare metal machine. - * - * @summary Power off the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_PowerOff.json - */ -async function powerOffBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachinePowerOffParameters = { skipShutdown: "True" }; - const options = { - bareMetalMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginPowerOffAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - powerOffBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReimageSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReimageSample.js deleted file mode 100644 index 606051ee7fe9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReimageSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Reimage the provided bare metal machine. - * - * @summary Reimage the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Reimage.json - */ -async function reimageBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReimageAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - reimageBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReplaceSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReplaceSample.js deleted file mode 100644 index 867707148ece..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesReplaceSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Replace the provided bare metal machine. - * - * @summary Replace the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Replace.json - */ -async function replaceBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineReplaceParameters = { - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:ad", - bootMacAddress: "00:00:4e:00:58:af", - machineName: "name", - serialNumber: "BM1219XXX", - }; - const options = { - bareMetalMachineReplaceParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReplaceAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - replaceBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRestartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRestartSample.js deleted file mode 100644 index 8536ed5c7905..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRestartSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Restart the provided bare metal machine. - * - * @summary Restart the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Restart.json - */ -async function restartBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRestartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - restartBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunCommandSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunCommandSample.js deleted file mode 100644 index f44b3ae8b2f6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunCommandSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunCommand.json - */ -async function runCommandOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunCommandParameters = { - arguments: ["--argument1", "argument2"], - limitTimeSeconds: 60, - script: "cHdkCg==", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunCommandAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunCommandParameters, - ); - console.log(result); -} - -async function main() { - runCommandOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsSample.js deleted file mode 100644 index 15c447246f17..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunDataExtractsSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunDataExtracts.json - */ -async function runDataExtractionOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsParameters = { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["SysInfo", "TTYLog"], - command: "hardware-support-data-collection", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunDataExtractsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, - ); - console.log(result); -} - -async function main() { - runDataExtractionOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunReadCommandsSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunReadCommandsSample.js deleted file mode 100644 index 9609a60ded96..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesRunReadCommandsSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunReadCommands.json - */ -async function runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters = { - limitTimeSeconds: 60, - commands: [ - { arguments: ["pods", "-A"], command: "kubectl get" }, - { arguments: ["192.168.0.99", "-c", "3"], command: "ping" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - ); - console.log(result); -} - -async function main() { - runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesStartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesStartSample.js deleted file mode 100644 index cc92e867f1aa..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesStartSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Start the provided bare metal machine. - * - * @summary Start the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Start.json - */ -async function startBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginStartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - startBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUncordonSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUncordonSample.js deleted file mode 100644 index 5da36a8e9133..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUncordonSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Uncordon the provided bare metal machine's Kubernetes node. - * - * @summary Uncordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Uncordon.json - */ -async function uncordonBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUncordonAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - uncordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUpdateSample.js deleted file mode 100644 index e8277ce5d2c4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bareMetalMachinesUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Patch.json - */ -async function patchBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineUpdateParameters = { - machineDetails: "machinedetails", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - bareMetalMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - patchBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsCreateOrUpdateSample.js deleted file mode 100644 index d26e9bc6c6eb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsCreateOrUpdateSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new baseboard management controller key set or update the existing one for the provided cluster. - * - * @summary Create a new baseboard management controller key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Create.json - */ -async function createOrUpdateBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetParameters = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - privilegeLevel: "Administrator", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - bmcKeySetParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsDeleteSample.js deleted file mode 100644 index c1083660407c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the baseboard management controller key set of the provided cluster. - * - * @summary Delete the baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Delete.json - */ -async function deleteBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - ); - console.log(result); -} - -async function main() { - deleteBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsGetSample.js deleted file mode 100644 index 2bbce51bd4e2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get baseboard management controller key set of the provided cluster. - * - * @summary Get baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json - */ -async function getBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.get(resourceGroupName, clusterName, bmcKeySetName); - console.log(result); -} - -async function main() { - getBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsListByClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsListByClusterSample.js deleted file mode 100644 index 102cdc48f9e7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsListByClusterSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of baseboard management controller key sets for the provided cluster. - * - * @summary Get a list of baseboard management controller key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_ListByCluster.json - */ -async function listBaseboardManagementControllerKeySetsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bmcKeySets.listByCluster(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBaseboardManagementControllerKeySetsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsUpdateSample.js deleted file mode 100644 index 1145a0ed070f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/bmcKeySetsUpdateSample.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Patch.json - */ -async function patchBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetUpdateParameters = { - expiration: new Date("2022-12-31T23:59:59.008Z"), - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options = { bmcKeySetUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - options, - ); - console.log(result); -} - -async function main() { - patchBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksCreateOrUpdateSample.js deleted file mode 100644 index e27d5a0eeca0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new cloud services network or update the properties of the existing cloud services network. - * - * @summary Create a new cloud services network or update the properties of the existing cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Create.json - */ -async function createOrUpdateCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkParameters = { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], - }, - ], - enableDefaultEgressEndpoints: "False", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - cloudServicesNetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksDeleteSample.js deleted file mode 100644 index 4243ae8fcf11..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided cloud services network. - * - * @summary Delete the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Delete.json - */ -async function deleteCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginDeleteAndWait( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main() { - deleteCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksGetSample.js deleted file mode 100644 index aba327a6f206..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided cloud services network. - * - * @summary Get properties of the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json - */ -async function getCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.get( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main() { - getCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListByResourceGroupSample.js deleted file mode 100644 index d2a39556aae2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of cloud services networks in the provided resource group. - * - * @summary Get a list of cloud services networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListByResourceGroup.json - */ -async function listCloudServicesNetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudServicesNetworks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCloudServicesNetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListBySubscriptionSample.js deleted file mode 100644 index 7c7842ff63ab..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of cloud services networks in the provided subscription. - * - * @summary Get a list of cloud services networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListBySubscription.json - */ -async function listCloudServicesNetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudServicesNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCloudServicesNetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksUpdateSample.js deleted file mode 100644 index 59e8e8544ef9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/cloudServicesNetworksUpdateSample.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Patch.json - */ -async function patchCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkUpdateParameters = { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [{ domainName: "storageaccountex.blob.core.windows.net", port: 443 }], - }, - ], - enableDefaultEgressEndpoints: "False", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - cloudServicesNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersCreateOrUpdateSample.js deleted file mode 100644 index 84f767d2e4e0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersCreateOrUpdateSample.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create.json - */ -async function createOrUpdateClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { type: "SystemAssigned" }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create_Uami.json - */ -async function createOrUpdateClusterManagerWithUserAssignedIdentity() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateClusterManager(); - createOrUpdateClusterManagerWithUserAssignedIdentity(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersDeleteSample.js deleted file mode 100644 index 5e7d17da1228..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided cluster manager. - * - * @summary Delete the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Delete.json - */ -async function deleteClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginDeleteAndWait( - resourceGroupName, - clusterManagerName, - ); - console.log(result); -} - -async function main() { - deleteClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersGetSample.js deleted file mode 100644 index 926123189786..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the properties of the provided cluster manager. - * - * @summary Get the properties of the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json - */ -async function getClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.get(resourceGroupName, clusterManagerName); - console.log(result); -} - -async function main() { - getClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListByResourceGroupSample.js deleted file mode 100644 index fbabad0af888..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of cluster managers in the provided resource group. - * - * @summary Get a list of cluster managers in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListByResourceGroup.json - */ -async function listClusterManagersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterManagers.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClusterManagersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListBySubscriptionSample.js deleted file mode 100644 index 9c4ccc4a1c6d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of cluster managers in the provided subscription. - * - * @summary Get a list of cluster managers in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListBySubscription.json - */ -async function listClusterManagersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterManagers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClusterManagersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateSample.js deleted file mode 100644 index 3241e71682a6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clusterManagersUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Patch.json - */ -async function patchClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerUpdateParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - clusterManagerUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.update( - resourceGroupName, - clusterManagerName, - options, - ); - console.log(result); -} - -async function main() { - patchClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersContinueUpdateVersionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersContinueUpdateVersionSample.js deleted file mode 100644 index 2db37c864165..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersContinueUpdateVersionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * - * @summary Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ContinueUpdateVersion.json - */ -async function continueUpdateClusterVersion() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterContinueUpdateVersionParameters = { machineGroupTargetingMode: "AlphaByRack" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginContinueUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterContinueUpdateVersionParameters, - ); - console.log(result); -} - -async function main() { - continueUpdateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersCreateOrUpdateSample.js deleted file mode 100644 index a67c825902e8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersCreateOrUpdateSample.js +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new cluster or update the properties of the cluster if it exists. - * - * @summary Create a new cluster or update the properties of the cluster if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Create.json - */ -async function createOrUpdateCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterParameters = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "AA1234", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - clusterLocation: "Foo Street, 3rd Floor, row 9", - clusterServicePrincipal: { - applicationId: "12345678-1234-1234-1234-123456789012", - password: "{password}", - principalId: "00000008-0004-0004-0004-000000000012", - tenantId: "80000000-4000-4000-4000-120000000000", - }, - clusterType: "SingleRack", - clusterVersion: "1.0.0", - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", - }, - containerUrl: "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - computeRackDefinitions: [ - { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "AA1234", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - ], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkFabricId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName", - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - secretArchive: { - keyVaultId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName", - useKeyVault: "True", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - clusterParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeleteSample.js deleted file mode 100644 index 27c15d093986..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided cluster. - * - * @summary Delete the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Delete.json - */ -async function deleteCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - deleteCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeploySample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeploySample.js deleted file mode 100644 index f9c43212df2a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersDeploySample.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy.json - */ -async function deployCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters = {}; - const options = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy_SkipValidation.json - */ -async function deployClusterSkippingValidation() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters = { - skipValidationsForMachines: ["bmmName1"], - }; - const options = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -async function main() { - deployCluster(); - deployClusterSkippingValidation(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersGetSample.js deleted file mode 100644 index 485498590fa6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided cluster. - * - * @summary Get properties of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json - */ -async function getCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - getCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListByResourceGroupSample.js deleted file mode 100644 index 542f3022055d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of clusters in the provided resource group. - * - * @summary Get a list of clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListByResourceGroup.json - */ -async function listClustersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClustersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListBySubscriptionSample.js deleted file mode 100644 index fe1b260e77dc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of clusters in the provided subscription. - * - * @summary Get a list of clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListBySubscription.json - */ -async function listClustersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClustersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersScanRuntimeSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersScanRuntimeSample.js deleted file mode 100644 index 012799ea57c5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersScanRuntimeSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * - * @summary Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ScanRuntime.json - */ -async function executeARuntimeProtectionScanOnTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterScanRuntimeParameters = { - scanActivity: "Scan", - }; - const options = { - clusterScanRuntimeParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginScanRuntimeAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main() { - executeARuntimeProtectionScanOnTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateSample.js deleted file mode 100644 index f00e4255dcb0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateSample.js +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json - */ -async function patchClusterAggregatorOrSingleRackDefinition() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "newSerialNumber", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_CommandOutput.json - */ -async function patchClusterCommandOutput() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - containerUrl: "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_Location.json - */ -async function patchClusterLocation() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - clusterLocation: "Foo Street, 3rd Floor, row 9", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_RuntimeProtectionConfiguration.json - */ -async function patchRuntimeProtectionConfiguration() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_SecretArchive.json - */ -async function patchSecretArchive() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - secretArchive: { - keyVaultId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName", - useKeyVault: "True", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_UpdateStrategy.json - */ -async function patchUpdateStrategy() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const options = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait(resourceGroupName, clusterName, options); - console.log(result); -} - -async function main() { - patchClusterAggregatorOrSingleRackDefinition(); - patchClusterCommandOutput(); - patchClusterLocation(); - patchRuntimeProtectionConfiguration(); - patchSecretArchive(); - patchUpdateStrategy(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateVersionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateVersionSample.js deleted file mode 100644 index a729722c686b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/clustersUpdateVersionSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update the version of the provided cluster to one of the available supported versions. - * - * @summary Update the version of the provided cluster to one of the available supported versions. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_UpdateVersion.json - */ -async function updateClusterVersion() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateVersionParameters = { - targetClusterVersion: "2.0", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterUpdateVersionParameters, - ); - console.log(result); -} - -async function main() { - updateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesCreateOrUpdateSample.js deleted file mode 100644 index 5dae3b154db6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new virtual machine console or update the properties of the existing virtual machine console. - * - * @summary Create a new virtual machine console or update the properties of the existing virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Create.json - */ -async function createOrUpdateVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleParameters = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - consoleParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesDeleteSample.js deleted file mode 100644 index ba13f58fcd8c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided virtual machine console. - * - * @summary Delete the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Delete.json - */ -async function deleteVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - ); - console.log(result); -} - -async function main() { - deleteVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesGetSample.js deleted file mode 100644 index b8da99ef8c68..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided virtual machine console. - * - * @summary Get properties of the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json - */ -async function getVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.get(resourceGroupName, virtualMachineName, consoleName); - console.log(result); -} - -async function main() { - getVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesListByVirtualMachineSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesListByVirtualMachineSample.js deleted file mode 100644 index 78d5904dc0df..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesListByVirtualMachineSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of consoles for the provided virtual machine. - * - * @summary Get a list of consoles for the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_ListByVirtualMachine.json - */ -async function listConsolesOfTheVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.consoles.listByVirtualMachine( - resourceGroupName, - virtualMachineName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConsolesOfTheVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesUpdateSample.js deleted file mode 100644 index 72c8ba95f44c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/consolesUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Patch.json - */ -async function patchVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleUpdateParameters = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { consoleUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - options, - ); - console.log(result); -} - -async function main() { - patchVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js deleted file mode 100644 index ab653df355df..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * - * @summary Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Create.json - */ -async function createOrUpdateKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureParameters = { - location: "location", - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - kubernetesClusterFeatureParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesDeleteSample.js deleted file mode 100644 index 738666ab80b1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster feature. - * - * @summary Delete the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Delete.json - */ -async function deleteKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesGetSample.js deleted file mode 100644 index 87abfe6d19de..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster feature. - * - * @summary Get properties of the provided the Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json - */ -async function getKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.get( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main() { - getKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js deleted file mode 100644 index 41e4ddce6309..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesListByKubernetesClusterSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of features for the provided Kubernetes cluster. - * - * @summary Get a list of features for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json - */ -async function listFeaturesForTheKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusterFeatures.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listFeaturesForTheKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesUpdateSample.js deleted file mode 100644 index 364e41ddd86d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClusterFeaturesUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch properties of the provided Kubernetes cluster feature. - * - * @summary Patch properties of the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Patch.json - */ -async function patchKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureUpdateParameters = { - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - kubernetesClusterFeatureUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersCreateOrUpdateSample.js deleted file mode 100644 index 30f2430e0a59..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersCreateOrUpdateSample.js +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Create.json - */ -async function createOrUpdateKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_XXXX", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - bgpServiceLoadBalancerConfiguration: { - bgpAdvertisements: [ - { - advertiseToFabric: "True", - communities: ["64512:100"], - ipAddressPools: ["pool1"], - peers: ["peer1"], - }, - ], - bgpPeers: [ - { - name: "peer1", - bfdEnabled: "False", - bgpMultiHop: "False", - holdTime: "P300s", - keepAliveTime: "P300s", - myAsn: 64512, - peerAddress: "203.0.113.254", - peerAsn: 64497, - peerPort: 179, - }, - ], - fabricPeeringEnabled: "True", - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.0/24"], - autoAssign: "True", - onlyUseHostIps: "True", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_L2LoadBalancer_Create.json - */ -async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_XXXX", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - l2ServiceLoadBalancerConfiguration: { - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.2-198.51.102.254"], - autoAssign: "True", - }, - ], - }, - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesCluster(); - createOrUpdateKubernetesClusterWithALayer2LoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersDeleteSample.js deleted file mode 100644 index 3f689baafa02..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster. - * - * @summary Delete the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Delete.json - */ -async function deleteKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersGetSample.js deleted file mode 100644 index 34762f892afe..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster. - * - * @summary Get properties of the provided the Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json - */ -async function getKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.get(resourceGroupName, kubernetesClusterName); - console.log(result); -} - -async function main() { - getKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListByResourceGroupSample.js deleted file mode 100644 index 8b008eccde08..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided resource group. - * - * @summary Get a list of Kubernetes clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListByResourceGroup.json - */ -async function listKubernetesClustersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listKubernetesClustersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListBySubscriptionSample.js deleted file mode 100644 index a0dbeaec9f78..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided subscription. - * - * @summary Get a list of Kubernetes clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListBySubscription.json - */ -async function listKubernetesClustersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listKubernetesClustersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersRestartNodeSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersRestartNodeSample.js deleted file mode 100644 index 7c1b164c815a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersRestartNodeSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Restart a targeted node of a Kubernetes cluster. - * - * @summary Restart a targeted node of a Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_RestartNode.json - */ -async function restartAKubernetesClusterNode() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterRestartNodeParameters = { nodeName: "nodeName" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginRestartNodeAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterRestartNodeParameters, - ); - console.log(result); -} - -async function main() { - restartAKubernetesClusterNode(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersUpdateSample.js deleted file mode 100644 index e8fb7a44d681..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/kubernetesClustersUpdateSample.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Patch.json - */ -async function patchKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterUpdateParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - }, - kubernetesVersion: "1.XX.Y", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - kubernetesClusterUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksCreateOrUpdateSample.js deleted file mode 100644 index aaaed9302a95..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new layer 2 (L2) network or update the properties of the existing network. - * - * @summary Create a new layer 2 (L2) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Create.json - */ -async function createOrUpdateL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkParameters = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - hybridAksPluginType: "DPDK", - interfaceName: "eth0", - l2IsolationDomainId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l2NetworkName, - l2NetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksDeleteSample.js deleted file mode 100644 index 73fd110eb356..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided layer 2 (L2) network. - * - * @summary Delete the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Delete.json - */ -async function deleteL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginDeleteAndWait(resourceGroupName, l2NetworkName); - console.log(result); -} - -async function main() { - deleteL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksGetSample.js deleted file mode 100644 index 4ea47f06d3ac..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided layer 2 (L2) network. - * - * @summary Get properties of the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json - */ -async function getL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.get(resourceGroupName, l2NetworkName); - console.log(result); -} - -async function main() { - getL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListByResourceGroupSample.js deleted file mode 100644 index ccbd5cde7f02..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided resource group. - * - * @summary Get a list of layer 2 (L2) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListByResourceGroup.json - */ -async function listL2NetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l2Networks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL2NetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListBySubscriptionSample.js deleted file mode 100644 index d3cf5982acff..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided subscription. - * - * @summary Get a list of layer 2 (L2) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListBySubscription.json - */ -async function listL2NetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l2Networks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL2NetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksUpdateSample.js deleted file mode 100644 index d747f77ec133..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l2NetworksUpdateSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update tags associated with the provided layer 2 (L2) network. - * - * @summary Update tags associated with the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Patch.json - */ -async function patchL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { l2NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.update(resourceGroupName, l2NetworkName, options); - console.log(result); -} - -async function main() { - patchL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksCreateOrUpdateSample.js deleted file mode 100644 index 51f0c8e2c4d5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new layer 3 (L3) network or update the properties of the existing network. - * - * @summary Create a new layer 3 (L3) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Create.json - */ -async function createOrUpdateL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkParameters = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - ipAllocationType: "DualStack", - ipv4ConnectedPrefix: "198.51.100.0/24", - ipv6ConnectedPrefix: "2001:db8::/64", - l3IsolationDomainId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlan: 12, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l3NetworkName, - l3NetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksDeleteSample.js deleted file mode 100644 index dd5b503fc7b9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided layer 3 (L3) network. - * - * @summary Delete the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Delete.json - */ -async function deleteL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginDeleteAndWait(resourceGroupName, l3NetworkName); - console.log(result); -} - -async function main() { - deleteL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksGetSample.js deleted file mode 100644 index d4e88b6d963d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided layer 3 (L3) network. - * - * @summary Get properties of the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json - */ -async function getL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.get(resourceGroupName, l3NetworkName); - console.log(result); -} - -async function main() { - getL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListByResourceGroupSample.js deleted file mode 100644 index 95cd6fd4dffa..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided resource group. - * - * @summary Get a list of layer 3 (L3) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListByResourceGroup.json - */ -async function listL3NetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l3Networks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL3NetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListBySubscriptionSample.js deleted file mode 100644 index 82e991da79f8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided subscription. - * - * @summary Get a list of layer 3 (L3) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListBySubscription.json - */ -async function listL3NetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l3Networks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL3NetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksUpdateSample.js deleted file mode 100644 index 4273a55d04fd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/l3NetworksUpdateSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update tags associated with the provided layer 3 (L3) network. - * - * @summary Update tags associated with the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Patch.json - */ -async function patchL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { l3NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.update(resourceGroupName, l3NetworkName, options); - console.log(result); -} - -async function main() { - patchL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsCreateOrUpdateSample.js deleted file mode 100644 index 69dacfeb077b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create new or update the existing metrics configuration of the provided cluster. - * - * @summary Create new or update the existing metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Create.json - */ -async function createOrUpdateMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationParameters = { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - metricsConfigurationParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsDeleteSample.js deleted file mode 100644 index d705257735bb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the metrics configuration of the provided cluster. - * - * @summary Delete the metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Delete.json - */ -async function deleteMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginDeleteAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main() { - deleteMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsGetSample.js deleted file mode 100644 index e566ee542092..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get metrics configuration of the provided cluster. - * - * @summary Get metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json - */ -async function getMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.get( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main() { - getMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsListByClusterSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsListByClusterSample.js deleted file mode 100644 index b7b25736858d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsListByClusterSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of metrics configurations for the provided cluster. - * - * @summary Get a list of metrics configurations for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_ListByCluster.json - */ -async function listMetricsConfigurationsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricsConfigurations.listByCluster( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricsConfigurationsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsUpdateSample.js deleted file mode 100644 index 0f7842698be5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/metricsConfigurationsUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Patch.json - */ -async function patchMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationUpdateParameters = { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - metricsConfigurationUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - ); - console.log(result); -} - -async function main() { - patchMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/operationsListSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/operationsListSample.js deleted file mode 100644 index c9de051be5ee..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * - * @summary Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Operations_List.json - */ -async function listResourceProviderOperations() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listResourceProviderOperations(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/package.json b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/package.json deleted file mode 100644 index 47fce9230b85..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-networkcloud-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/networkcloud/arm-networkcloud" - }, - "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/networkcloud/arm-networkcloud", - "dependencies": { - "@azure/arm-networkcloud": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusGetSample.js deleted file mode 100644 index 0a6a29c1cc92..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the properties of the provided rack SKU. - * - * @summary Get the properties of the provided rack SKU. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json - */ -async function getRackSkuResource() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const rackSkuName = "rackSkuName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.rackSkus.get(rackSkuName); - console.log(result); -} - -async function main() { - getRackSkuResource(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusListBySubscriptionSample.js deleted file mode 100644 index 9e72cf31f42d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/rackSkusListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of rack SKUs in the provided subscription. - * - * @summary Get a list of rack SKUs in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_ListBySubscription.json - */ -async function listRackSkUsForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.rackSkus.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRackSkUsForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksCreateOrUpdateSample.js deleted file mode 100644 index 403fdd6f39d3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new rack or update properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new rack or update properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Create.json - */ -async function createOrUpdateRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackParameters = { - availabilityZone: "1", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackLocation: "Rack 28", - rackSerialNumber: "RACK_SERIAL_NUMBER", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginCreateOrUpdateAndWait( - resourceGroupName, - rackName, - rackParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksDeleteSample.js deleted file mode 100644 index 790303b75502..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided rack. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided rack. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Delete.json - */ -async function deleteRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginDeleteAndWait(resourceGroupName, rackName); - console.log(result); -} - -async function main() { - deleteRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksGetSample.js deleted file mode 100644 index 40c76fc65bf8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided rack. - * - * @summary Get properties of the provided rack. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json - */ -async function getRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.get(resourceGroupName, rackName); - console.log(result); -} - -async function main() { - getRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListByResourceGroupSample.js deleted file mode 100644 index 37246ade11c4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of racks in the provided resource group. - * - * @summary Get a list of racks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListByResourceGroup.json - */ -async function listRacksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.racks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRacksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListBySubscriptionSample.js deleted file mode 100644 index f220a15fe3d4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of racks in the provided subscription. - * - * @summary Get a list of racks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListBySubscription.json - */ -async function listRacksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.racks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRacksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksUpdateSample.js deleted file mode 100644 index fb032d3644a1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/racksUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Patch.json - */ -async function patchRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackUpdateParameters = { - rackLocation: "Rack 2B", - rackSerialNumber: "RACK_SERIAL_NUMBER", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { rackUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginUpdateAndWait(resourceGroupName, rackName, options); - console.log(result); -} - -async function main() { - patchRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/sample.env b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesCreateOrUpdateSample.js deleted file mode 100644 index f3f233afbf2a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new storage appliance or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new storage appliance or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Create.json - */ -async function createOrUpdateStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceParameters = { - administratorCredentials: { password: "{password}", username: "adminUser" }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceSkuId: "684E-3B16-399E", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDeleteSample.js deleted file mode 100644 index 50f1f3646b80..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided storage appliance. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided storage appliance. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Delete.json - */ -async function deleteStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginDeleteAndWait( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - deleteStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDisableRemoteVendorManagementSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDisableRemoteVendorManagementSample.js deleted file mode 100644 index c9efee46a0f3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesDisableRemoteVendorManagementSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Disable remote vendor management of the provided storage appliance. - * - * @summary Disable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_DisableRemoteVendorManagement.json - */ -async function turnOffRemoteVendorManagementForStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginDisableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - turnOffRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesEnableRemoteVendorManagementSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesEnableRemoteVendorManagementSample.js deleted file mode 100644 index b2f80f36231c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesEnableRemoteVendorManagementSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Enable remote vendor management of the provided storage appliance. - * - * @summary Enable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_EnableRemoteVendorManagement.json - */ -async function turnOnRemoteVendorManagementForStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceEnableRemoteVendorManagementParameters = { - supportEndpoints: ["10.0.0.0/24"], - }; - const options = { - storageApplianceEnableRemoteVendorManagementParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginEnableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main() { - turnOnRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesGetSample.js deleted file mode 100644 index c0c45c5e2687..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided storage appliance. - * - * @summary Get properties of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json - */ -async function getStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.get(resourceGroupName, storageApplianceName); - console.log(result); -} - -async function main() { - getStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListByResourceGroupSample.js deleted file mode 100644 index 71fa29a21b66..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of storage appliances in the provided resource group. - * - * @summary Get a list of storage appliances in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListByResourceGroup.json - */ -async function listStorageAppliancesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageAppliances.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageAppliancesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListBySubscriptionSample.js deleted file mode 100644 index 8c38c545536a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of storage appliances in the provided subscription. - * - * @summary Get a list of storage appliances in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListBySubscription.json - */ -async function listStorageAppliancesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageAppliances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageAppliancesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesUpdateSample.js deleted file mode 100644 index 2b1dfd95c22b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/storageAppliancesUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * - * @summary Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Patch.json - */ -async function patchStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceUpdateParameters = { - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - storageApplianceUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginUpdateAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main() { - patchStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksCreateOrUpdateSample.js deleted file mode 100644 index 19ab320d855b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksCreateOrUpdateSample.js +++ /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. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new trunked network or update the properties of the existing trunked network. - * - * @summary Create a new trunked network or update the properties of the existing trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Create.json - */ -async function createOrUpdateTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkParameters = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - isolationDomainIds: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - ], - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlans: [12, 14], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - trunkedNetworkName, - trunkedNetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksDeleteSample.js deleted file mode 100644 index fd9ba7494331..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided trunked network. - * - * @summary Delete the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Delete.json - */ -async function deleteTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginDeleteAndWait( - resourceGroupName, - trunkedNetworkName, - ); - console.log(result); -} - -async function main() { - deleteTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksGetSample.js deleted file mode 100644 index 932d515a5f77..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided trunked network. - * - * @summary Get properties of the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json - */ -async function getTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.get(resourceGroupName, trunkedNetworkName); - console.log(result); -} - -async function main() { - getTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListByResourceGroupSample.js deleted file mode 100644 index 31e914b7b22d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of trunked networks in the provided resource group. - * - * @summary Get a list of trunked networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListByResourceGroup.json - */ -async function listTrunkedNetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.trunkedNetworks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listTrunkedNetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListBySubscriptionSample.js deleted file mode 100644 index f0a5f8715651..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of trunked networks in the provided subscription. - * - * @summary Get a list of trunked networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListBySubscription.json - */ -async function listTrunkedNetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.trunkedNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listTrunkedNetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksUpdateSample.js deleted file mode 100644 index a783ca619b51..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/trunkedNetworksUpdateSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update tags associated with the provided trunked network. - * - * @summary Update tags associated with the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Patch.json - */ -async function patchTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { - trunkedNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.update( - resourceGroupName, - trunkedNetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesCreateOrUpdateSample.js deleted file mode 100644 index 8345c5c98a1d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesCreateOrUpdateSample.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new virtual machine or update the properties of the existing virtual machine. - * - * @summary Create a new virtual machine or update the properties of the existing virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Create.json - */ -async function createOrUpdateVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineParameters = { - adminUsername: "username", - bootMethod: "UEFI", - cloudServicesNetworkAttachment: { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - ipAllocationMethod: "Dynamic", - }, - cpuCores: 2, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - memorySizeGB: 8, - networkAttachments: [ - { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - defaultGateway: "True", - ipAllocationMethod: "Dynamic", - ipv4Address: "198.51.100.1", - ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", - networkAttachmentName: "netAttachName01", - }, - ], - networkData: "bmV0d29ya0RhdGVTYW1wbGU=", - placementHints: [ - { - hintType: "Affinity", - resourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - schedulingExecution: "Hard", - scope: "", - }, - ], - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - storageProfile: { - osDisk: { - createOption: "Ephemeral", - deleteOption: "Delete", - diskSizeGB: 120, - }, - volumeAttachments: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", - ], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - userData: "dXNlckRhdGVTYW1wbGU=", - vmDeviceModel: "T2", - vmImage: "myacr.azurecr.io/foobar:latest", - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - virtualMachineParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesDeleteSample.js deleted file mode 100644 index e88fe80eacc2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided virtual machine. - * - * @summary Delete the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Delete.json - */ -async function deleteVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - deleteVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesGetSample.js deleted file mode 100644 index 9b7b7bd550bd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided virtual machine. - * - * @summary Get properties of the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json - */ -async function getVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.get(resourceGroupName, virtualMachineName); - console.log(result); -} - -async function main() { - getVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListByResourceGroupSample.js deleted file mode 100644 index 139a2e54d463..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of virtual machines in the provided resource group. - * - * @summary Get a list of virtual machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListByResourceGroup.json - */ -async function listVirtualMachinesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListBySubscriptionSample.js deleted file mode 100644 index b5d4be9bfd74..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of virtual machines in the provided subscription. - * - * @summary Get a list of virtual machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListBySubscription.json - */ -async function listVirtualMachinesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesPowerOffSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesPowerOffSample.js deleted file mode 100644 index 7e626d6d4324..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesPowerOffSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Power off the provided virtual machine. - * - * @summary Power off the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_PowerOff.json - */ -async function powerOffVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachinePowerOffParameters = { - skipShutdown: "True", - }; - const options = { - virtualMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginPowerOffAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - powerOffVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesReimageSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesReimageSample.js deleted file mode 100644 index 2b595e41d827..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesReimageSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Reimage the provided virtual machine. - * - * @summary Reimage the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Reimage.json - */ -async function reimageVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginReimageAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - reimageVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesRestartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesRestartSample.js deleted file mode 100644 index 412bbad1e048..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesRestartSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Restart the provided virtual machine. - * - * @summary Restart the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Restart.json - */ -async function restartVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - restartVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesStartSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesStartSample.js deleted file mode 100644 index f10ae4f9078b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesStartSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Start the provided virtual machine. - * - * @summary Start the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Start.json - */ -async function startVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - startVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesUpdateSample.js deleted file mode 100644 index 1ab9258f4dda..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/virtualMachinesUpdateSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Patch.json - */ -async function patchVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const options = { - virtualMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - patchVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesCreateOrUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesCreateOrUpdateSample.js deleted file mode 100644 index 4dba01968f21..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new volume or update the properties of the existing one. - * - * @summary Create a new volume or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Create.json - */ -async function createOrUpdateVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeParameters = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sizeMiB: 10000, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginCreateOrUpdateAndWait( - resourceGroupName, - volumeName, - volumeParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesDeleteSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesDeleteSample.js deleted file mode 100644 index 85a6b5ca9507..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesDeleteSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete the provided volume. - * - * @summary Delete the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Delete.json - */ -async function deleteVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginDeleteAndWait(resourceGroupName, volumeName); - console.log(result); -} - -async function main() { - deleteVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesGetSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesGetSample.js deleted file mode 100644 index 227d536b530a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesGetSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get properties of the provided volume. - * - * @summary Get properties of the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json - */ -async function getVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.get(resourceGroupName, volumeName); - console.log(result); -} - -async function main() { - getVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListByResourceGroupSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListByResourceGroupSample.js deleted file mode 100644 index d109279f5c16..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListByResourceGroupSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of volumes in the provided resource group. - * - * @summary Get a list of volumes in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListByResourceGroup.json - */ -async function listVolumesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.volumes.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVolumesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListBySubscriptionSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListBySubscriptionSample.js deleted file mode 100644 index c0ae7290a276..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesListBySubscriptionSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of volumes in the provided subscription. - * - * @summary Get a list of volumes in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListBySubscription.json - */ -async function listVolumeForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.volumes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVolumeForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesUpdateSample.js b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesUpdateSample.js deleted file mode 100644 index 4810322f7fee..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/javascript/volumesUpdateSample.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 { NetworkCloud } = require("@azure/arm-networkcloud"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update tags associated with the provided volume. - * - * @summary Update tags associated with the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Patch.json - */ -async function patchVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeUpdateParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options = { volumeUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.update(resourceGroupName, volumeName, options); - console.log(result); -} - -async function main() { - patchVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/README.md b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/README.md deleted file mode 100644 index 5e9685bdd0c0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/README.md +++ /dev/null @@ -1,313 +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** | -| ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [agentPoolsCreateOrUpdateSample.ts][agentpoolscreateorupdatesample] | Create a new Kubernetes cluster agent pool or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Create.json | -| [agentPoolsDeleteSample.ts][agentpoolsdeletesample] | Delete the provided Kubernetes cluster agent pool. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Delete.json | -| [agentPoolsGetSample.ts][agentpoolsgetsample] | Get properties of the provided Kubernetes cluster agent pool. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json | -| [agentPoolsListByKubernetesClusterSample.ts][agentpoolslistbykubernetesclustersample] | Get a list of agent pools for the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_ListByKubernetesCluster.json | -| [agentPoolsUpdateSample.ts][agentpoolsupdatesample] | Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Patch.json | -| [bareMetalMachineKeySetsCreateOrUpdateSample.ts][baremetalmachinekeysetscreateorupdatesample] | Create a new bare metal machine key set or update the existing one for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Create.json | -| [bareMetalMachineKeySetsDeleteSample.ts][baremetalmachinekeysetsdeletesample] | Delete the bare metal machine key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Delete.json | -| [bareMetalMachineKeySetsGetSample.ts][baremetalmachinekeysetsgetsample] | Get bare metal machine key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json | -| [bareMetalMachineKeySetsListByClusterSample.ts][baremetalmachinekeysetslistbyclustersample] | Get a list of bare metal machine key sets for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_ListByCluster.json | -| [bareMetalMachineKeySetsUpdateSample.ts][baremetalmachinekeysetsupdatesample] | Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Patch.json | -| [bareMetalMachinesCordonSample.ts][baremetalmachinescordonsample] | Cordon the provided bare metal machine's Kubernetes node. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Cordon.json | -| [bareMetalMachinesCreateOrUpdateSample.ts][baremetalmachinescreateorupdatesample] | Create a new bare metal machine or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Create.json | -| [bareMetalMachinesDeleteSample.ts][baremetalmachinesdeletesample] | Delete the provided bare metal machine. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Delete.json | -| [bareMetalMachinesGetSample.ts][baremetalmachinesgetsample] | Get properties of the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json | -| [bareMetalMachinesListByResourceGroupSample.ts][baremetalmachineslistbyresourcegroupsample] | Get a list of bare metal machines in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListByResourceGroup.json | -| [bareMetalMachinesListBySubscriptionSample.ts][baremetalmachineslistbysubscriptionsample] | Get a list of bare metal machines in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListBySubscription.json | -| [bareMetalMachinesPowerOffSample.ts][baremetalmachinespoweroffsample] | Power off the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_PowerOff.json | -| [bareMetalMachinesReimageSample.ts][baremetalmachinesreimagesample] | Reimage the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Reimage.json | -| [bareMetalMachinesReplaceSample.ts][baremetalmachinesreplacesample] | Replace the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Replace.json | -| [bareMetalMachinesRestartSample.ts][baremetalmachinesrestartsample] | Restart the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Restart.json | -| [bareMetalMachinesRunCommandSample.ts][baremetalmachinesruncommandsample] | Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunCommand.json | -| [bareMetalMachinesRunDataExtractsSample.ts][baremetalmachinesrundataextractssample] | Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunDataExtracts.json | -| [bareMetalMachinesRunReadCommandsSample.ts][baremetalmachinesrunreadcommandssample] | Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunReadCommands.json | -| [bareMetalMachinesStartSample.ts][baremetalmachinesstartsample] | Start the provided bare metal machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Start.json | -| [bareMetalMachinesUncordonSample.ts][baremetalmachinesuncordonsample] | Uncordon the provided bare metal machine's Kubernetes node. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Uncordon.json | -| [bareMetalMachinesUpdateSample.ts][baremetalmachinesupdatesample] | Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Patch.json | -| [bmcKeySetsCreateOrUpdateSample.ts][bmckeysetscreateorupdatesample] | Create a new baseboard management controller key set or update the existing one for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Create.json | -| [bmcKeySetsDeleteSample.ts][bmckeysetsdeletesample] | Delete the baseboard management controller key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Delete.json | -| [bmcKeySetsGetSample.ts][bmckeysetsgetsample] | Get baseboard management controller key set of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json | -| [bmcKeySetsListByClusterSample.ts][bmckeysetslistbyclustersample] | Get a list of baseboard management controller key sets for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_ListByCluster.json | -| [bmcKeySetsUpdateSample.ts][bmckeysetsupdatesample] | Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Patch.json | -| [cloudServicesNetworksCreateOrUpdateSample.ts][cloudservicesnetworkscreateorupdatesample] | Create a new cloud services network or update the properties of the existing cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Create.json | -| [cloudServicesNetworksDeleteSample.ts][cloudservicesnetworksdeletesample] | Delete the provided cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Delete.json | -| [cloudServicesNetworksGetSample.ts][cloudservicesnetworksgetsample] | Get properties of the provided cloud services network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json | -| [cloudServicesNetworksListByResourceGroupSample.ts][cloudservicesnetworkslistbyresourcegroupsample] | Get a list of cloud services networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListByResourceGroup.json | -| [cloudServicesNetworksListBySubscriptionSample.ts][cloudservicesnetworkslistbysubscriptionsample] | Get a list of cloud services networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListBySubscription.json | -| [cloudServicesNetworksUpdateSample.ts][cloudservicesnetworksupdatesample] | Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Patch.json | -| [clusterManagersCreateOrUpdateSample.ts][clustermanagerscreateorupdatesample] | Create a new cluster manager or update properties of the cluster manager if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create.json | -| [clusterManagersDeleteSample.ts][clustermanagersdeletesample] | Delete the provided cluster manager. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Delete.json | -| [clusterManagersGetSample.ts][clustermanagersgetsample] | Get the properties of the provided cluster manager. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json | -| [clusterManagersListByResourceGroupSample.ts][clustermanagerslistbyresourcegroupsample] | Get a list of cluster managers in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListByResourceGroup.json | -| [clusterManagersListBySubscriptionSample.ts][clustermanagerslistbysubscriptionsample] | Get a list of cluster managers in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListBySubscription.json | -| [clusterManagersUpdateSample.ts][clustermanagersupdatesample] | Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Patch.json | -| [clustersContinueUpdateVersionSample.ts][clusterscontinueupdateversionsample] | Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ContinueUpdateVersion.json | -| [clustersCreateOrUpdateSample.ts][clusterscreateorupdatesample] | Create a new cluster or update the properties of the cluster if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Create.json | -| [clustersDeleteSample.ts][clustersdeletesample] | Delete the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Delete.json | -| [clustersDeploySample.ts][clustersdeploysample] | Deploy the cluster using the rack configuration provided during creation. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy.json | -| [clustersGetSample.ts][clustersgetsample] | Get properties of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json | -| [clustersListByResourceGroupSample.ts][clusterslistbyresourcegroupsample] | Get a list of clusters in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListByResourceGroup.json | -| [clustersListBySubscriptionSample.ts][clusterslistbysubscriptionsample] | Get a list of clusters in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListBySubscription.json | -| [clustersScanRuntimeSample.ts][clustersscanruntimesample] | Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ScanRuntime.json | -| [clustersUpdateSample.ts][clustersupdatesample] | Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json | -| [clustersUpdateVersionSample.ts][clustersupdateversionsample] | Update the version of the provided cluster to one of the available supported versions. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_UpdateVersion.json | -| [consolesCreateOrUpdateSample.ts][consolescreateorupdatesample] | Create a new virtual machine console or update the properties of the existing virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Create.json | -| [consolesDeleteSample.ts][consolesdeletesample] | Delete the provided virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Delete.json | -| [consolesGetSample.ts][consolesgetsample] | Get properties of the provided virtual machine console. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json | -| [consolesListByVirtualMachineSample.ts][consoleslistbyvirtualmachinesample] | Get a list of consoles for the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_ListByVirtualMachine.json | -| [consolesUpdateSample.ts][consolesupdatesample] | Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Patch.json | -| [kubernetesClusterFeaturesCreateOrUpdateSample.ts][kubernetesclusterfeaturescreateorupdatesample] | Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Create.json | -| [kubernetesClusterFeaturesDeleteSample.ts][kubernetesclusterfeaturesdeletesample] | Delete the provided Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Delete.json | -| [kubernetesClusterFeaturesGetSample.ts][kubernetesclusterfeaturesgetsample] | Get properties of the provided the Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json | -| [kubernetesClusterFeaturesListByKubernetesClusterSample.ts][kubernetesclusterfeatureslistbykubernetesclustersample] | Get a list of features for the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json | -| [kubernetesClusterFeaturesUpdateSample.ts][kubernetesclusterfeaturesupdatesample] | Patch properties of the provided Kubernetes cluster feature. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Patch.json | -| [kubernetesClustersCreateOrUpdateSample.ts][kubernetesclusterscreateorupdatesample] | Create a new Kubernetes cluster or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Create.json | -| [kubernetesClustersDeleteSample.ts][kubernetesclustersdeletesample] | Delete the provided Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Delete.json | -| [kubernetesClustersGetSample.ts][kubernetesclustersgetsample] | Get properties of the provided the Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json | -| [kubernetesClustersListByResourceGroupSample.ts][kubernetesclusterslistbyresourcegroupsample] | Get a list of Kubernetes clusters in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListByResourceGroup.json | -| [kubernetesClustersListBySubscriptionSample.ts][kubernetesclusterslistbysubscriptionsample] | Get a list of Kubernetes clusters in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListBySubscription.json | -| [kubernetesClustersRestartNodeSample.ts][kubernetesclustersrestartnodesample] | Restart a targeted node of a Kubernetes cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_RestartNode.json | -| [kubernetesClustersUpdateSample.ts][kubernetesclustersupdatesample] | Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Patch.json | -| [l2NetworksCreateOrUpdateSample.ts][l2networkscreateorupdatesample] | Create a new layer 2 (L2) network or update the properties of the existing network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Create.json | -| [l2NetworksDeleteSample.ts][l2networksdeletesample] | Delete the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Delete.json | -| [l2NetworksGetSample.ts][l2networksgetsample] | Get properties of the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json | -| [l2NetworksListByResourceGroupSample.ts][l2networkslistbyresourcegroupsample] | Get a list of layer 2 (L2) networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListByResourceGroup.json | -| [l2NetworksListBySubscriptionSample.ts][l2networkslistbysubscriptionsample] | Get a list of layer 2 (L2) networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListBySubscription.json | -| [l2NetworksUpdateSample.ts][l2networksupdatesample] | Update tags associated with the provided layer 2 (L2) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Patch.json | -| [l3NetworksCreateOrUpdateSample.ts][l3networkscreateorupdatesample] | Create a new layer 3 (L3) network or update the properties of the existing network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Create.json | -| [l3NetworksDeleteSample.ts][l3networksdeletesample] | Delete the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Delete.json | -| [l3NetworksGetSample.ts][l3networksgetsample] | Get properties of the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json | -| [l3NetworksListByResourceGroupSample.ts][l3networkslistbyresourcegroupsample] | Get a list of layer 3 (L3) networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListByResourceGroup.json | -| [l3NetworksListBySubscriptionSample.ts][l3networkslistbysubscriptionsample] | Get a list of layer 3 (L3) networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListBySubscription.json | -| [l3NetworksUpdateSample.ts][l3networksupdatesample] | Update tags associated with the provided layer 3 (L3) network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Patch.json | -| [metricsConfigurationsCreateOrUpdateSample.ts][metricsconfigurationscreateorupdatesample] | Create new or update the existing metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Create.json | -| [metricsConfigurationsDeleteSample.ts][metricsconfigurationsdeletesample] | Delete the metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Delete.json | -| [metricsConfigurationsGetSample.ts][metricsconfigurationsgetsample] | Get metrics configuration of the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json | -| [metricsConfigurationsListByClusterSample.ts][metricsconfigurationslistbyclustersample] | Get a list of metrics configurations for the provided cluster. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_ListByCluster.json | -| [metricsConfigurationsUpdateSample.ts][metricsconfigurationsupdatesample] | Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Patch.json | -| [operationsListSample.ts][operationslistsample] | Get a list of all available resource provider operations. It contains a URL link to get the next set of results. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Operations_List.json | -| [rackSkusGetSample.ts][rackskusgetsample] | Get the properties of the provided rack SKU. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json | -| [rackSkusListBySubscriptionSample.ts][rackskuslistbysubscriptionsample] | Get a list of rack SKUs in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_ListBySubscription.json | -| [racksCreateOrUpdateSample.ts][rackscreateorupdatesample] | Create a new rack or update properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Create.json | -| [racksDeleteSample.ts][racksdeletesample] | Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Delete.json | -| [racksGetSample.ts][racksgetsample] | Get properties of the provided rack. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json | -| [racksListByResourceGroupSample.ts][rackslistbyresourcegroupsample] | Get a list of racks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListByResourceGroup.json | -| [racksListBySubscriptionSample.ts][rackslistbysubscriptionsample] | Get a list of racks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListBySubscription.json | -| [racksUpdateSample.ts][racksupdatesample] | Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Patch.json | -| [storageAppliancesCreateOrUpdateSample.ts][storageappliancescreateorupdatesample] | Create a new storage appliance or update the properties of the existing one. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Create.json | -| [storageAppliancesDeleteSample.ts][storageappliancesdeletesample] | Delete the provided storage appliance. All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Delete.json | -| [storageAppliancesDisableRemoteVendorManagementSample.ts][storageappliancesdisableremotevendormanagementsample] | Disable remote vendor management of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_DisableRemoteVendorManagement.json | -| [storageAppliancesEnableRemoteVendorManagementSample.ts][storageappliancesenableremotevendormanagementsample] | Enable remote vendor management of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_EnableRemoteVendorManagement.json | -| [storageAppliancesGetSample.ts][storageappliancesgetsample] | Get properties of the provided storage appliance. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json | -| [storageAppliancesListByResourceGroupSample.ts][storageapplianceslistbyresourcegroupsample] | Get a list of storage appliances in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListByResourceGroup.json | -| [storageAppliancesListBySubscriptionSample.ts][storageapplianceslistbysubscriptionsample] | Get a list of storage appliances in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListBySubscription.json | -| [storageAppliancesUpdateSample.ts][storageappliancesupdatesample] | Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Patch.json | -| [trunkedNetworksCreateOrUpdateSample.ts][trunkednetworkscreateorupdatesample] | Create a new trunked network or update the properties of the existing trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Create.json | -| [trunkedNetworksDeleteSample.ts][trunkednetworksdeletesample] | Delete the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Delete.json | -| [trunkedNetworksGetSample.ts][trunkednetworksgetsample] | Get properties of the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json | -| [trunkedNetworksListByResourceGroupSample.ts][trunkednetworkslistbyresourcegroupsample] | Get a list of trunked networks in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListByResourceGroup.json | -| [trunkedNetworksListBySubscriptionSample.ts][trunkednetworkslistbysubscriptionsample] | Get a list of trunked networks in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListBySubscription.json | -| [trunkedNetworksUpdateSample.ts][trunkednetworksupdatesample] | Update tags associated with the provided trunked network. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Patch.json | -| [virtualMachinesCreateOrUpdateSample.ts][virtualmachinescreateorupdatesample] | Create a new virtual machine or update the properties of the existing virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Create.json | -| [virtualMachinesDeleteSample.ts][virtualmachinesdeletesample] | Delete the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Delete.json | -| [virtualMachinesGetSample.ts][virtualmachinesgetsample] | Get properties of the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json | -| [virtualMachinesListByResourceGroupSample.ts][virtualmachineslistbyresourcegroupsample] | Get a list of virtual machines in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListByResourceGroup.json | -| [virtualMachinesListBySubscriptionSample.ts][virtualmachineslistbysubscriptionsample] | Get a list of virtual machines in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListBySubscription.json | -| [virtualMachinesPowerOffSample.ts][virtualmachinespoweroffsample] | Power off the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_PowerOff.json | -| [virtualMachinesReimageSample.ts][virtualmachinesreimagesample] | Reimage the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Reimage.json | -| [virtualMachinesRestartSample.ts][virtualmachinesrestartsample] | Restart the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Restart.json | -| [virtualMachinesStartSample.ts][virtualmachinesstartsample] | Start the provided virtual machine. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Start.json | -| [virtualMachinesUpdateSample.ts][virtualmachinesupdatesample] | Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Patch.json | -| [volumesCreateOrUpdateSample.ts][volumescreateorupdatesample] | Create a new volume or update the properties of the existing one. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Create.json | -| [volumesDeleteSample.ts][volumesdeletesample] | Delete the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Delete.json | -| [volumesGetSample.ts][volumesgetsample] | Get properties of the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json | -| [volumesListByResourceGroupSample.ts][volumeslistbyresourcegroupsample] | Get a list of volumes in the provided resource group. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListByResourceGroup.json | -| [volumesListBySubscriptionSample.ts][volumeslistbysubscriptionsample] | Get a list of volumes in the provided subscription. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListBySubscription.json | -| [volumesUpdateSample.ts][volumesupdatesample] | Update tags associated with the provided volume. x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Patch.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/agentPoolsCreateOrUpdateSample.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 dev-tool run vendored cross-env NETWORKCLOUD_SUBSCRIPTION_ID="" NETWORKCLOUD_RESOURCE_GROUP="" node dist/agentPoolsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[agentpoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts -[agentpoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsDeleteSample.ts -[agentpoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsGetSample.ts -[agentpoolslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsListByKubernetesClusterSample.ts -[agentpoolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsUpdateSample.ts -[baremetalmachinekeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts -[baremetalmachinekeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsDeleteSample.ts -[baremetalmachinekeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsGetSample.ts -[baremetalmachinekeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts -[baremetalmachinekeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsUpdateSample.ts -[baremetalmachinescordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCordonSample.ts -[baremetalmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts -[baremetalmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesDeleteSample.ts -[baremetalmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesGetSample.ts -[baremetalmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListByResourceGroupSample.ts -[baremetalmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListBySubscriptionSample.ts -[baremetalmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesPowerOffSample.ts -[baremetalmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReimageSample.ts -[baremetalmachinesreplacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReplaceSample.ts -[baremetalmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRestartSample.ts -[baremetalmachinesruncommandsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunCommandSample.ts -[baremetalmachinesrundataextractssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsSample.ts -[baremetalmachinesrunreadcommandssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunReadCommandsSample.ts -[baremetalmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesStartSample.ts -[baremetalmachinesuncordonsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUncordonSample.ts -[baremetalmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUpdateSample.ts -[bmckeysetscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsCreateOrUpdateSample.ts -[bmckeysetsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsDeleteSample.ts -[bmckeysetsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsGetSample.ts -[bmckeysetslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsListByClusterSample.ts -[bmckeysetsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsUpdateSample.ts -[cloudservicesnetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts -[cloudservicesnetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksDeleteSample.ts -[cloudservicesnetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksGetSample.ts -[cloudservicesnetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts -[cloudservicesnetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts -[cloudservicesnetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksUpdateSample.ts -[clustermanagerscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersCreateOrUpdateSample.ts -[clustermanagersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersDeleteSample.ts -[clustermanagersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersGetSample.ts -[clustermanagerslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListByResourceGroupSample.ts -[clustermanagerslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListBySubscriptionSample.ts -[clustermanagersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateSample.ts -[clusterscontinueupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersContinueUpdateVersionSample.ts -[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersCreateOrUpdateSample.ts -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeleteSample.ts -[clustersdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeploySample.ts -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersGetSample.ts -[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListByResourceGroupSample.ts -[clusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListBySubscriptionSample.ts -[clustersscanruntimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersScanRuntimeSample.ts -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateSample.ts -[clustersupdateversionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateVersionSample.ts -[consolescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesCreateOrUpdateSample.ts -[consolesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesDeleteSample.ts -[consolesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesGetSample.ts -[consoleslistbyvirtualmachinesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesListByVirtualMachineSample.ts -[consolesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesUpdateSample.ts -[kubernetesclusterfeaturescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts -[kubernetesclusterfeaturesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesDeleteSample.ts -[kubernetesclusterfeaturesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesGetSample.ts -[kubernetesclusterfeatureslistbykubernetesclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts -[kubernetesclusterfeaturesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesUpdateSample.ts -[kubernetesclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersCreateOrUpdateSample.ts -[kubernetesclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersDeleteSample.ts -[kubernetesclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersGetSample.ts -[kubernetesclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListByResourceGroupSample.ts -[kubernetesclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListBySubscriptionSample.ts -[kubernetesclustersrestartnodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersRestartNodeSample.ts -[kubernetesclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersUpdateSample.ts -[l2networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksCreateOrUpdateSample.ts -[l2networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksDeleteSample.ts -[l2networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksGetSample.ts -[l2networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListByResourceGroupSample.ts -[l2networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListBySubscriptionSample.ts -[l2networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksUpdateSample.ts -[l3networkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksCreateOrUpdateSample.ts -[l3networksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksDeleteSample.ts -[l3networksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksGetSample.ts -[l3networkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListByResourceGroupSample.ts -[l3networkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListBySubscriptionSample.ts -[l3networksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksUpdateSample.ts -[metricsconfigurationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts -[metricsconfigurationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsDeleteSample.ts -[metricsconfigurationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsGetSample.ts -[metricsconfigurationslistbyclustersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsListByClusterSample.ts -[metricsconfigurationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsUpdateSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/operationsListSample.ts -[rackskusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusGetSample.ts -[rackskuslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusListBySubscriptionSample.ts -[rackscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksCreateOrUpdateSample.ts -[racksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksDeleteSample.ts -[racksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksGetSample.ts -[rackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListByResourceGroupSample.ts -[rackslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListBySubscriptionSample.ts -[racksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksUpdateSample.ts -[storageappliancescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesCreateOrUpdateSample.ts -[storageappliancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDeleteSample.ts -[storageappliancesdisableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts -[storageappliancesenableremotevendormanagementsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts -[storageappliancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesGetSample.ts -[storageapplianceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListByResourceGroupSample.ts -[storageapplianceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListBySubscriptionSample.ts -[storageappliancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesUpdateSample.ts -[trunkednetworkscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksCreateOrUpdateSample.ts -[trunkednetworksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksDeleteSample.ts -[trunkednetworksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksGetSample.ts -[trunkednetworkslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListByResourceGroupSample.ts -[trunkednetworkslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListBySubscriptionSample.ts -[trunkednetworksupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksUpdateSample.ts -[virtualmachinescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesCreateOrUpdateSample.ts -[virtualmachinesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesDeleteSample.ts -[virtualmachinesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesGetSample.ts -[virtualmachineslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts -[virtualmachineslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListBySubscriptionSample.ts -[virtualmachinespoweroffsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesPowerOffSample.ts -[virtualmachinesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesReimageSample.ts -[virtualmachinesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesRestartSample.ts -[virtualmachinesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesStartSample.ts -[virtualmachinesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesUpdateSample.ts -[volumescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesCreateOrUpdateSample.ts -[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesDeleteSample.ts -[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesGetSample.ts -[volumeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListByResourceGroupSample.ts -[volumeslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListBySubscriptionSample.ts -[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesUpdateSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-networkcloud?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkcloud/arm-networkcloud/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json deleted file mode 100644 index 4da147110d4a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-networkcloud-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/networkcloud/arm-networkcloud" - }, - "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/networkcloud/arm-networkcloud", - "dependencies": { - "@azure/arm-networkcloud": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.7.2", - "rimraf": "latest" - } -} diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/sample.env b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts deleted file mode 100644 index c7697d321c81..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AgentPool, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster agent pool or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Create.json - */ -async function createOrUpdateKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolParameters: AgentPool = { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - labels: [{ key: "kubernetes.label", value: "true" }], - location: "location", - mode: "System", - tags: { key1: "myvalue1", key2: "myvalue2" }, - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - agentPoolParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsDeleteSample.ts deleted file mode 100644 index 4387cc6d4396..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster agent pool. - * - * @summary Delete the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Delete.json - */ -async function deleteKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsGetSample.ts deleted file mode 100644 index a3a1b90c6688..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided Kubernetes cluster agent pool. - * - * @summary Get properties of the provided Kubernetes cluster agent pool. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Get.json - */ -async function getKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.get( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - ); - console.log(result); -} - -async function main() { - getKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsListByKubernetesClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsListByKubernetesClusterSample.ts deleted file mode 100644 index e5f73d56654b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsListByKubernetesClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of agent pools for the provided Kubernetes cluster. - * - * @summary Get a list of agent pools for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_ListByKubernetesCluster.json - */ -async function listAgentPoolsOfTheKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.agentPools.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAgentPoolsOfTheKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsUpdateSample.ts deleted file mode 100644 index c9894b4b06a5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/agentPoolsUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AgentPoolPatchParameters, - AgentPoolsUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided Kubernetes cluster agent pool, or update the tags associated with the Kubernetes cluster agent pool. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/AgentPools_Patch.json - */ -async function patchKubernetesClusterAgentPool() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const agentPoolName = "agentPoolName"; - const agentPoolUpdateParameters: AgentPoolPatchParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - tags: { key1: "myvalue1", key2: "myvalue2" }, - upgradeSettings: { drainTimeout: 1800, maxSurge: "1", maxUnavailable: "0" }, - }; - const options: AgentPoolsUpdateOptionalParams = { agentPoolUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.agentPools.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - agentPoolName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesClusterAgentPool(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts deleted file mode 100644 index 94db552f9acd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BareMetalMachineKeySet, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new bare metal machine key set or update the existing one for the provided cluster. - * - * @summary Create a new bare metal machine key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Create.json - */ -async function createOrUpdateBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetParameters: BareMetalMachineKeySet = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - location: "location", - osGroupName: "standardAccessGroup", - privilegeLevel: "Standard", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.bareMetalMachineKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - bareMetalMachineKeySetParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsDeleteSample.ts deleted file mode 100644 index a458896b7afd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the bare metal machine key set of the provided cluster. - * - * @summary Delete the bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Delete.json - */ -async function deleteBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main() { - deleteBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsGetSample.ts deleted file mode 100644 index 2c9e83cfc938..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get bare metal machine key set of the provided cluster. - * - * @summary Get bare metal machine key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Get.json - */ -async function getBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.get( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - ); - console.log(result); -} - -async function main() { - getBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts deleted file mode 100644 index 469323ee8894..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsListByClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of bare metal machine key sets for the provided cluster. - * - * @summary Get a list of bare metal machine key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_ListByCluster.json - */ -async function listBareMetalMachineKeySetsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachineKeySets.listByCluster( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachineKeySetsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsUpdateSample.ts deleted file mode 100644 index bfd3b96877c8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachineKeySetsUpdateSample.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 { - BareMetalMachineKeySetPatchParameters, - BareMetalMachineKeySetsUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of bare metal machine key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachineKeySets_Patch.json - */ -async function patchBareMetalMachineKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bareMetalMachineKeySetName = "bareMetalMachineKeySetName"; - const bareMetalMachineKeySetUpdateParameters: BareMetalMachineKeySetPatchParameters = - { - expiration: new Date("2022-12-31T23:59:59.008Z"), - jumpHostsAllowed: ["192.0.2.1", "192.0.2.5"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options: BareMetalMachineKeySetsUpdateOptionalParams = { - bareMetalMachineKeySetUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachineKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bareMetalMachineKeySetName, - options, - ); - console.log(result); -} - -async function main() { - patchBareMetalMachineKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCordonSample.ts deleted file mode 100644 index 2d659f287539..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCordonSample.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 { - BareMetalMachineCordonParameters, - BareMetalMachinesCordonOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Cordon the provided bare metal machine's Kubernetes node. - * - * @summary Cordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Cordon.json - */ -async function cordonBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineCordonParameters: BareMetalMachineCordonParameters = { - evacuate: "True", - }; - const options: BareMetalMachinesCordonOptionalParams = { - bareMetalMachineCordonParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCordonAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - cordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts deleted file mode 100644 index 67bc71f6b358..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesCreateOrUpdateSample.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BareMetalMachine, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new bare metal machine or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new bare metal machine or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Create.json - */ -async function createOrUpdateBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineParameters: BareMetalMachine = { - bmcConnectionString: "bmcconnectionstring", - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:00", - bootMacAddress: "00:00:4e:00:58:af", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - machineDetails: "User-provided machine details.", - machineName: "r01c001", - machineSkuId: "684E-3B16-399E", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesDeleteSample.ts deleted file mode 100644 index 91d9a17785d0..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided bare metal machine. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided bare metal machine. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Delete.json - */ -async function deleteBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginDeleteAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - deleteBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesGetSample.ts deleted file mode 100644 index 4be051e7d876..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided bare metal machine. - * - * @summary Get properties of the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Get.json - */ -async function getBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.get( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - getBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListByResourceGroupSample.ts deleted file mode 100644 index 86cea406f77e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of bare metal machines in the provided resource group. - * - * @summary Get a list of bare metal machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListByResourceGroup.json - */ -async function listBareMetalMachinesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachines.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachinesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListBySubscriptionSample.ts deleted file mode 100644 index a29e78895662..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of bare metal machines in the provided subscription. - * - * @summary Get a list of bare metal machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_ListBySubscription.json - */ -async function listBareMetalMachinesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bareMetalMachines.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBareMetalMachinesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesPowerOffSample.ts deleted file mode 100644 index 71c0995d5072..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesPowerOffSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachinePowerOffParameters, - BareMetalMachinesPowerOffOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Power off the provided bare metal machine. - * - * @summary Power off the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_PowerOff.json - */ -async function powerOffBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachinePowerOffParameters: BareMetalMachinePowerOffParameters = - { skipShutdown: "True" }; - const options: BareMetalMachinesPowerOffOptionalParams = { - bareMetalMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginPowerOffAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - powerOffBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReimageSample.ts deleted file mode 100644 index 084cec6a8a06..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReimageSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Reimage the provided bare metal machine. - * - * @summary Reimage the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Reimage.json - */ -async function reimageBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReimageAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - reimageBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReplaceSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReplaceSample.ts deleted file mode 100644 index 83432e15d1aa..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesReplaceSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachineReplaceParameters, - BareMetalMachinesReplaceOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Replace the provided bare metal machine. - * - * @summary Replace the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Replace.json - */ -async function replaceBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineReplaceParameters: BareMetalMachineReplaceParameters = { - bmcCredentials: { password: "{password}", username: "bmcuser" }, - bmcMacAddress: "00:00:4f:00:57:ad", - bootMacAddress: "00:00:4e:00:58:af", - machineName: "name", - serialNumber: "BM1219XXX", - }; - const options: BareMetalMachinesReplaceOptionalParams = { - bareMetalMachineReplaceParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginReplaceAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - replaceBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRestartSample.ts deleted file mode 100644 index 3206a1b50e98..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRestartSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Restart the provided bare metal machine. - * - * @summary Restart the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Restart.json - */ -async function restartBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRestartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - restartBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunCommandSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunCommandSample.ts deleted file mode 100644 index affdd5903dfe..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunCommandSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachineRunCommandParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunCommand.json - */ -async function runCommandOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunCommandParameters: BareMetalMachineRunCommandParameters = - { - arguments: ["--argument1", "argument2"], - limitTimeSeconds: 60, - script: "cHdkCg==", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunCommandAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunCommandParameters, - ); - console.log(result); -} - -async function main() { - runCommandOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsSample.ts deleted file mode 100644 index 934e95ee2f03..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunDataExtractsSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachineRunDataExtractsParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunDataExtracts.json - */ -async function runDataExtractionOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunDataExtractsParameters: BareMetalMachineRunDataExtractsParameters = - { - limitTimeSeconds: 60, - commands: [ - { - arguments: ["SysInfo", "TTYLog"], - command: "hardware-support-data-collection", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunDataExtractsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunDataExtractsParameters, - ); - console.log(result); -} - -async function main() { - runDataExtractionOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunReadCommandsSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunReadCommandsSample.ts deleted file mode 100644 index 40f33b11b94e..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesRunReadCommandsSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachineRunReadCommandsParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * - * @summary Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_RunReadCommands.json - */ -async function runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineRunReadCommandsParameters: BareMetalMachineRunReadCommandsParameters = - { - limitTimeSeconds: 60, - commands: [ - { arguments: ["pods", "-A"], command: "kubectl get" }, - { arguments: ["192.168.0.99", "-c", "3"], command: "ping" }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginRunReadCommandsAndWait( - resourceGroupName, - bareMetalMachineName, - bareMetalMachineRunReadCommandsParameters, - ); - console.log(result); -} - -async function main() { - runAndRetrieveOutputFromReadOnlyCommandsOnBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesStartSample.ts deleted file mode 100644 index 0de69d64e7e9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesStartSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start the provided bare metal machine. - * - * @summary Start the provided bare metal machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Start.json - */ -async function startBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginStartAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - startBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUncordonSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUncordonSample.ts deleted file mode 100644 index 3135d60e38c7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUncordonSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Uncordon the provided bare metal machine's Kubernetes node. - * - * @summary Uncordon the provided bare metal machine's Kubernetes node. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Uncordon.json - */ -async function uncordonBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUncordonAndWait( - resourceGroupName, - bareMetalMachineName, - ); - console.log(result); -} - -async function main() { - uncordonBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUpdateSample.ts deleted file mode 100644 index facf40c50473..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bareMetalMachinesUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BareMetalMachinePatchParameters, - BareMetalMachinesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided bare metal machine, or update tags associated with the bare metal machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BareMetalMachines_Patch.json - */ -async function patchBareMetalMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const bareMetalMachineName = "bareMetalMachineName"; - const bareMetalMachineUpdateParameters: BareMetalMachinePatchParameters = { - machineDetails: "machinedetails", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: BareMetalMachinesUpdateOptionalParams = { - bareMetalMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bareMetalMachines.beginUpdateAndWait( - resourceGroupName, - bareMetalMachineName, - options, - ); - console.log(result); -} - -async function main() { - patchBareMetalMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsCreateOrUpdateSample.ts deleted file mode 100644 index c6f32228e60b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsCreateOrUpdateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BmcKeySet, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new baseboard management controller key set or update the existing one for the provided cluster. - * - * @summary Create a new baseboard management controller key set or update the existing one for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Create.json - */ -async function createOrUpdateBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetParameters: BmcKeySet = { - azureGroupId: "f110271b-XXXX-4163-9b99-214d91660f0e", - expiration: new Date("2022-12-31T23:59:59.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - privilegeLevel: "Administrator", - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - bmcKeySetParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsDeleteSample.ts deleted file mode 100644 index 65e4975cfb94..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the baseboard management controller key set of the provided cluster. - * - * @summary Delete the baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Delete.json - */ -async function deleteBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginDeleteAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - ); - console.log(result); -} - -async function main() { - deleteBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsGetSample.ts deleted file mode 100644 index 0ab7d176bac9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get baseboard management controller key set of the provided cluster. - * - * @summary Get baseboard management controller key set of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Get.json - */ -async function getBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.get( - resourceGroupName, - clusterName, - bmcKeySetName, - ); - console.log(result); -} - -async function main() { - getBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsListByClusterSample.ts deleted file mode 100644 index 0a0a2ca745a8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsListByClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of baseboard management controller key sets for the provided cluster. - * - * @summary Get a list of baseboard management controller key sets for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_ListByCluster.json - */ -async function listBaseboardManagementControllerKeySetsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.bmcKeySets.listByCluster( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listBaseboardManagementControllerKeySetsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsUpdateSample.ts deleted file mode 100644 index 4940f7fc3c0b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/bmcKeySetsUpdateSample.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BmcKeySetPatchParameters, - BmcKeySetsUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of baseboard management controller key set for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/BmcKeySets_Patch.json - */ -async function patchBaseboardManagementControllerKeySetOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const bmcKeySetName = "bmcKeySetName"; - const bmcKeySetUpdateParameters: BmcKeySetPatchParameters = { - expiration: new Date("2022-12-31T23:59:59.008Z"), - tags: { key1: "myvalue1", key2: "myvalue2" }, - userList: [ - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userABC", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - { - description: - "Needs access for troubleshooting as a part of the support team", - azureUserName: "userXYZ", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - userPrincipalName: "userABC@contoso.com", - }, - ], - }; - const options: BmcKeySetsUpdateOptionalParams = { bmcKeySetUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.bmcKeySets.beginUpdateAndWait( - resourceGroupName, - clusterName, - bmcKeySetName, - options, - ); - console.log(result); -} - -async function main() { - patchBaseboardManagementControllerKeySetOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 2d88858913ba..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CloudServicesNetwork, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new cloud services network or update the properties of the existing cloud services network. - * - * @summary Create a new cloud services network or update the properties of the existing cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Create.json - */ -async function createOrUpdateCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkParameters: CloudServicesNetwork = { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [ - { domainName: "storageaccountex.blob.core.windows.net", port: 443 }, - ], - }, - ], - enableDefaultEgressEndpoints: "False", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - cloudServicesNetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksDeleteSample.ts deleted file mode 100644 index 43272822c7be..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided cloud services network. - * - * @summary Delete the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Delete.json - */ -async function deleteCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginDeleteAndWait( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main() { - deleteCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksGetSample.ts deleted file mode 100644 index b6c85a2484e8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided cloud services network. - * - * @summary Get properties of the provided cloud services network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Get.json - */ -async function getCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.get( - resourceGroupName, - cloudServicesNetworkName, - ); - console.log(result); -} - -async function main() { - getCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts deleted file mode 100644 index 9acabedbc877..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of cloud services networks in the provided resource group. - * - * @summary Get a list of cloud services networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListByResourceGroup.json - */ -async function listCloudServicesNetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudServicesNetworks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCloudServicesNetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListBySubscriptionSample.ts deleted file mode 100644 index 75873c6a5b70..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of cloud services networks in the provided subscription. - * - * @summary Get a list of cloud services networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_ListBySubscription.json - */ -async function listCloudServicesNetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.cloudServicesNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCloudServicesNetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksUpdateSample.ts deleted file mode 100644 index 6ed22847d911..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/cloudServicesNetworksUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CloudServicesNetworkPatchParameters, - CloudServicesNetworksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Update properties of the provided cloud services network, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/CloudServicesNetworks_Patch.json - */ -async function patchCloudServicesNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const cloudServicesNetworkName = "cloudServicesNetworkName"; - const cloudServicesNetworkUpdateParameters: CloudServicesNetworkPatchParameters = - { - additionalEgressEndpoints: [ - { - category: "azure-resource-management", - endpoints: [ - { domainName: "storageaccountex.blob.core.windows.net", port: 443 }, - ], - }, - ], - enableDefaultEgressEndpoints: "False", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: CloudServicesNetworksUpdateOptionalParams = { - cloudServicesNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.cloudServicesNetworks.beginUpdateAndWait( - resourceGroupName, - cloudServicesNetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchCloudServicesNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersCreateOrUpdateSample.ts deleted file mode 100644 index 339da6457153..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersCreateOrUpdateSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ClusterManager, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create.json - */ -async function createOrUpdateClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters: ClusterManager = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { type: "SystemAssigned" }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new cluster manager or update properties of the cluster manager if it exists. - * - * @summary Create a new cluster manager or update properties of the cluster manager if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Create_Uami.json - */ -async function createOrUpdateClusterManagerWithUserAssignedIdentity() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerParameters: ClusterManager = { - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - fabricControllerId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterManagerName, - clusterManagerParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateClusterManager(); - createOrUpdateClusterManagerWithUserAssignedIdentity(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersDeleteSample.ts deleted file mode 100644 index 74835e71c48d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided cluster manager. - * - * @summary Delete the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Delete.json - */ -async function deleteClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.beginDeleteAndWait( - resourceGroupName, - clusterManagerName, - ); - console.log(result); -} - -async function main() { - deleteClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersGetSample.ts deleted file mode 100644 index bb1d8c46822f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of the provided cluster manager. - * - * @summary Get the properties of the provided cluster manager. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Get.json - */ -async function getClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.get( - resourceGroupName, - clusterManagerName, - ); - console.log(result); -} - -async function main() { - getClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListByResourceGroupSample.ts deleted file mode 100644 index 225f97edf840..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of cluster managers in the provided resource group. - * - * @summary Get a list of cluster managers in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListByResourceGroup.json - */ -async function listClusterManagersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterManagers.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClusterManagersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListBySubscriptionSample.ts deleted file mode 100644 index d4512b994519..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of cluster managers in the provided subscription. - * - * @summary Get a list of cluster managers in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_ListBySubscription.json - */ -async function listClusterManagersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterManagers.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClusterManagersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateSample.ts deleted file mode 100644 index 078025fec242..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clusterManagersUpdateSample.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 { - ClusterManagerPatchParameters, - ClusterManagersUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterManagers_Patch.json - */ -async function patchClusterManager() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterManagerName = "clusterManagerName"; - const clusterManagerUpdateParameters: ClusterManagerPatchParameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClusterManagersUpdateOptionalParams = { - clusterManagerUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusterManagers.update( - resourceGroupName, - clusterManagerName, - options, - ); - console.log(result); -} - -async function main() { - patchClusterManager(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersContinueUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersContinueUpdateVersionSample.ts deleted file mode 100644 index 23363b876cad..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersContinueUpdateVersionSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterContinueUpdateVersionParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * - * @summary Trigger the continuation of an update for a cluster with a matching update strategy that has paused after completing a segment of the update. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ContinueUpdateVersion.json - */ -async function continueUpdateClusterVersion() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterContinueUpdateVersionParameters: ClusterContinueUpdateVersionParameters = - { machineGroupTargetingMode: "AlphaByRack" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginContinueUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterContinueUpdateVersionParameters, - ); - console.log(result); -} - -async function main() { - continueUpdateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersCreateOrUpdateSample.ts deleted file mode 100644 index a1a46b51ce40..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Cluster, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new cluster or update the properties of the cluster if it exists. - * - * @summary Create a new cluster or update the properties of the cluster if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Create.json - */ -async function createOrUpdateCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterParameters: Cluster = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "AA1234", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - analyticsWorkspaceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName", - clusterLocation: "Foo Street, 3rd Floor, row 9", - clusterServicePrincipal: { - applicationId: "12345678-1234-1234-1234-123456789012", - password: "{password}", - principalId: "00000008-0004-0004-0004-000000000012", - tenantId: "80000000-4000-4000-4000-120000000000", - }, - clusterType: "SingleRack", - clusterVersion: "1.0.0", - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity1", - }, - containerUrl: - "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - computeRackDefinitions: [ - { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "AA1234", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - ], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - }, - }, - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkFabricId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/fabricName", - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - secretArchive: { - keyVaultId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName", - useKeyVault: "True", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - clusterParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeleteSample.ts deleted file mode 100644 index 82178e264fa3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided cluster. - * - * @summary Delete the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Delete.json - */ -async function deleteCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main() { - deleteCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeploySample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeploySample.ts deleted file mode 100644 index 528ceb23c65b..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersDeploySample.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterDeployParameters, - ClustersDeployOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy.json - */ -async function deployCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters: ClusterDeployParameters = {}; - const options: ClustersDeployOptionalParams = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Deploy the cluster using the rack configuration provided during creation. - * - * @summary Deploy the cluster using the rack configuration provided during creation. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Deploy_SkipValidation.json - */ -async function deployClusterSkippingValidation() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterDeployParameters: ClusterDeployParameters = { - skipValidationsForMachines: ["bmmName1"], - }; - const options: ClustersDeployOptionalParams = { clusterDeployParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginDeployAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main() { - deployCluster(); - deployClusterSkippingValidation(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersGetSample.ts deleted file mode 100644 index a401c420ecb7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided cluster. - * - * @summary Get properties of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Get.json - */ -async function getCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - getCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListByResourceGroupSample.ts deleted file mode 100644 index 938e7293a013..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of clusters in the provided resource group. - * - * @summary Get a list of clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListByResourceGroup.json - */ -async function listClustersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClustersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListBySubscriptionSample.ts deleted file mode 100644 index fb5aac01e26d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of clusters in the provided subscription. - * - * @summary Get a list of clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ListBySubscription.json - */ -async function listClustersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClustersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersScanRuntimeSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersScanRuntimeSample.ts deleted file mode 100644 index c61e9c230b5c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersScanRuntimeSample.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 { - ClusterScanRuntimeParameters, - ClustersScanRuntimeOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * - * @summary Triggers the execution of a runtime protection scan to detect and remediate detected issues, in accordance with the cluster configuration. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_ScanRuntime.json - */ -async function executeARuntimeProtectionScanOnTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterScanRuntimeParameters: ClusterScanRuntimeParameters = { - scanActivity: "Scan", - }; - const options: ClustersScanRuntimeOptionalParams = { - clusterScanRuntimeParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginScanRuntimeAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main() { - executeARuntimeProtectionScanOnTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateSample.ts deleted file mode 100644 index 65c151c685a2..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateSample.ts +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterPatchParameters, - ClustersUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_AggregatorOrSingleRackDefinition.json - */ -async function patchClusterAggregatorOrSingleRackDefinition() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - aggregatorOrSingleRackDefinition: { - bareMetalMachineConfigurationData: [ - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:FF", - bootMacAddress: "00:BB:CC:DD:EE:FF", - machineDetails: "extraDetails", - machineName: "bmmName1", - rackSlot: 1, - serialNumber: "BM1219XXX", - }, - { - bmcCredentials: { password: "{password}", username: "username" }, - bmcMacAddress: "AA:BB:CC:DD:EE:00", - bootMacAddress: "00:BB:CC:DD:EE:00", - machineDetails: "extraDetails", - machineName: "bmmName2", - rackSlot: 2, - serialNumber: "BM1219YYY", - }, - ], - networkRackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkRacks/networkRackName", - rackLocation: "Foo Datacenter, Floor 3, Aisle 9, Rack 2", - rackSerialNumber: "newSerialNumber", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - storageApplianceConfigurationData: [ - { - adminCredentials: { password: "{password}", username: "username" }, - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceName: "vmName", - }, - ], - }, - computeDeploymentThreshold: { - type: "PercentSuccess", - grouping: "PerCluster", - value: 90, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_CommandOutput.json - */ -async function patchClusterCommandOutput() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - commandOutputSettings: { - associatedIdentity: { - identityType: "UserAssignedIdentity", - userAssignedIdentityResourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userIdentity2", - }, - containerUrl: - "https://myaccount.blob.core.windows.net/mycontainer?restype=container", - }, - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity1": - {}, - "/subscriptions/123e4567E89b12d3A456426655440000/resourceGroups/resourceGroupName/providers/MicrosoftManagedIdentity/userAssignedIdentities/userIdentity2": - {}, - }, - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_Location.json - */ -async function patchClusterLocation() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - clusterLocation: "Foo Street, 3rd Floor, row 9", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_RuntimeProtectionConfiguration.json - */ -async function patchRuntimeProtectionConfiguration() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - runtimeProtectionConfiguration: { enforcementLevel: "OnDemand" }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_SecretArchive.json - */ -async function patchSecretArchive() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - secretArchive: { - keyVaultId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName", - useKeyVault: "True", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided cluster, or update the tags associated with the cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_Patch_UpdateStrategy.json - */ -async function patchUpdateStrategy() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateParameters: ClusterPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - updateStrategy: { - maxUnavailable: 4, - strategyType: "Rack", - thresholdType: "CountSuccess", - thresholdValue: 4, - waitTimeMinutes: 10, - }, - }; - const options: ClustersUpdateOptionalParams = { clusterUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterName, - options, - ); - console.log(result); -} - -async function main() { - patchClusterAggregatorOrSingleRackDefinition(); - patchClusterCommandOutput(); - patchClusterLocation(); - patchRuntimeProtectionConfiguration(); - patchSecretArchive(); - patchUpdateStrategy(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateVersionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateVersionSample.ts deleted file mode 100644 index e8e0d647b315..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/clustersUpdateVersionSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterUpdateVersionParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update the version of the provided cluster to one of the available supported versions. - * - * @summary Update the version of the provided cluster to one of the available supported versions. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Clusters_UpdateVersion.json - */ -async function updateClusterVersion() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const clusterUpdateVersionParameters: ClusterUpdateVersionParameters = { - targetClusterVersion: "2.0", - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.clusters.beginUpdateVersionAndWait( - resourceGroupName, - clusterName, - clusterUpdateVersionParameters, - ); - console.log(result); -} - -async function main() { - updateClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesCreateOrUpdateSample.ts deleted file mode 100644 index b954c189d226..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Console, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new virtual machine console or update the properties of the existing virtual machine console. - * - * @summary Create a new virtual machine console or update the properties of the existing virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Create.json - */ -async function createOrUpdateVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleParameters: Console = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - consoleParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesDeleteSample.ts deleted file mode 100644 index 0b55048fecca..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided virtual machine console. - * - * @summary Delete the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Delete.json - */ -async function deleteVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - ); - console.log(result); -} - -async function main() { - deleteVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesGetSample.ts deleted file mode 100644 index ebf9811607ce..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided virtual machine console. - * - * @summary Get properties of the provided virtual machine console. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Get.json - */ -async function getVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.get( - resourceGroupName, - virtualMachineName, - consoleName, - ); - console.log(result); -} - -async function main() { - getVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesListByVirtualMachineSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesListByVirtualMachineSample.ts deleted file mode 100644 index 09c3ab9eefc3..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesListByVirtualMachineSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of consoles for the provided virtual machine. - * - * @summary Get a list of consoles for the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_ListByVirtualMachine.json - */ -async function listConsolesOfTheVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.consoles.listByVirtualMachine( - resourceGroupName, - virtualMachineName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConsolesOfTheVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesUpdateSample.ts deleted file mode 100644 index 45c35c2d0766..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/consolesUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ConsolePatchParameters, - ConsolesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Consoles_Patch.json - */ -async function patchVirtualMachineConsole() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const consoleName = "default"; - const consoleUpdateParameters: ConsolePatchParameters = { - enabled: "True", - expiration: new Date("2022-06-01T01:27:03.008Z"), - sshPublicKey: { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: ConsolesUpdateOptionalParams = { consoleUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.consoles.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - consoleName, - options, - ); - console.log(result); -} - -async function main() { - patchVirtualMachineConsole(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts deleted file mode 100644 index ac0651811c2a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - KubernetesClusterFeature, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * - * @summary Create a new Kubernetes cluster feature or update properties of the Kubernetes cluster feature if it exists. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Create.json - */ -async function createOrUpdateKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureParameters: KubernetesClusterFeature = { - location: "location", - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.kubernetesClusterFeatures.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - kubernetesClusterFeatureParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesDeleteSample.ts deleted file mode 100644 index 1a7aad6538cc..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster feature. - * - * @summary Delete the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Delete.json - */ -async function deleteKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesGetSample.ts deleted file mode 100644 index f523f683a5d1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster feature. - * - * @summary Get properties of the provided the Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Get.json - */ -async function getKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.get( - resourceGroupName, - kubernetesClusterName, - featureName, - ); - console.log(result); -} - -async function main() { - getKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts deleted file mode 100644 index 5d856fd7fd8a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesListByKubernetesClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of features for the provided Kubernetes cluster. - * - * @summary Get a list of features for the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_ListByKubernetesCluster.json - */ -async function listFeaturesForTheKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusterFeatures.listByKubernetesCluster( - resourceGroupName, - kubernetesClusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listFeaturesForTheKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesUpdateSample.ts deleted file mode 100644 index 9066690dd962..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClusterFeaturesUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - KubernetesClusterFeaturePatchParameters, - KubernetesClusterFeaturesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of the provided Kubernetes cluster feature. - * - * @summary Patch properties of the provided Kubernetes cluster feature. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusterFeatures_Patch.json - */ -async function patchKubernetesClusterFeature() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const featureName = "featureName"; - const kubernetesClusterFeatureUpdateParameters: KubernetesClusterFeaturePatchParameters = - { - options: [{ key: "featureOptionName", value: "featureOptionValue" }], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: KubernetesClusterFeaturesUpdateOptionalParams = { - kubernetesClusterFeatureUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusterFeatures.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - featureName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesClusterFeature(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersCreateOrUpdateSample.ts deleted file mode 100644 index 19ed7ee379b4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { KubernetesCluster, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Create.json - */ -async function createOrUpdateKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters: KubernetesCluster = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_XXXX", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - bgpServiceLoadBalancerConfiguration: { - bgpAdvertisements: [ - { - advertiseToFabric: "True", - communities: ["64512:100"], - ipAddressPools: ["pool1"], - peers: ["peer1"], - }, - ], - bgpPeers: [ - { - name: "peer1", - bfdEnabled: "False", - bgpMultiHop: "False", - holdTime: "P300s", - keepAliveTime: "P300s", - myAsn: 64512, - peerAddress: "203.0.113.254", - peerAsn: 64497, - peerPort: 179, - }, - ], - fabricPeeringEnabled: "True", - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.0/24"], - autoAssign: "True", - onlyUseHostIps: "True", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Kubernetes cluster or update the properties of the existing one. - * - * @summary Create a new Kubernetes cluster or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_L2LoadBalancer_Create.json - */ -async function createOrUpdateKubernetesClusterWithALayer2LoadBalancer() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterParameters: KubernetesCluster = { - aadConfiguration: { - adminGroupObjectIds: ["ffffffff-ffff-ffff-ffff-ffffffffffff"], - }, - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - vmSkuName: "NC_XXXX", - }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - initialAgentPoolConfigurations: [ - { - name: "SystemPool-1", - administratorConfiguration: { - adminUsername: "azure", - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - agentOptions: { hugepagesCount: 96, hugepagesSize: "1G" }, - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - availabilityZones: ["1", "2", "3"], - count: 3, - labels: [{ key: "kubernetes.label", value: "true" }], - mode: "System", - taints: [{ key: "kubernetes.taint", value: "true" }], - upgradeSettings: { maxSurge: "1" }, - vmSkuName: "NC_XXXX", - }, - ], - kubernetesVersion: "1.XX.Y", - location: "location", - managedResourceGroupConfiguration: { - name: "my-managed-rg", - location: "East US", - }, - networkConfiguration: { - attachedNetworkConfiguration: { - l2Networks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName", - pluginType: "DPDK", - }, - ], - l3Networks: [ - { - ipamEnabled: "False", - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - pluginType: "SRIOV", - }, - ], - trunkedNetworks: [ - { - networkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName", - pluginType: "MACVLAN", - }, - ], - }, - cloudServicesNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - cniNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - dnsServiceIp: "198.51.101.2", - l2ServiceLoadBalancerConfiguration: { - ipAddressPools: [ - { - name: "pool1", - addresses: ["198.51.102.2-198.51.102.254"], - autoAssign: "True", - }, - ], - }, - podCidrs: ["198.51.100.0/24"], - serviceCidrs: ["198.51.101.0/24"], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateKubernetesCluster(); - createOrUpdateKubernetesClusterWithALayer2LoadBalancer(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersDeleteSample.ts deleted file mode 100644 index 9ac3d0cb4448..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided Kubernetes cluster. - * - * @summary Delete the provided Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Delete.json - */ -async function deleteKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginDeleteAndWait( - resourceGroupName, - kubernetesClusterName, - ); - console.log(result); -} - -async function main() { - deleteKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersGetSample.ts deleted file mode 100644 index b373918d3c43..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided the Kubernetes cluster. - * - * @summary Get properties of the provided the Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Get.json - */ -async function getKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.get( - resourceGroupName, - kubernetesClusterName, - ); - console.log(result); -} - -async function main() { - getKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListByResourceGroupSample.ts deleted file mode 100644 index d82c55f07927..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided resource group. - * - * @summary Get a list of Kubernetes clusters in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListByResourceGroup.json - */ -async function listKubernetesClustersForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listKubernetesClustersForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListBySubscriptionSample.ts deleted file mode 100644 index 1c194a841a0c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of Kubernetes clusters in the provided subscription. - * - * @summary Get a list of Kubernetes clusters in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_ListBySubscription.json - */ -async function listKubernetesClustersForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.kubernetesClusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listKubernetesClustersForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersRestartNodeSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersRestartNodeSample.ts deleted file mode 100644 index 20ce002585cd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersRestartNodeSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - KubernetesClusterRestartNodeParameters, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Restart a targeted node of a Kubernetes cluster. - * - * @summary Restart a targeted node of a Kubernetes cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_RestartNode.json - */ -async function restartAKubernetesClusterNode() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterRestartNodeParameters: KubernetesClusterRestartNodeParameters = - { nodeName: "nodeName" }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginRestartNodeAndWait( - resourceGroupName, - kubernetesClusterName, - kubernetesClusterRestartNodeParameters, - ); - console.log(result); -} - -async function main() { - restartAKubernetesClusterNode(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersUpdateSample.ts deleted file mode 100644 index 2355f51f6e1a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/kubernetesClustersUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - KubernetesClusterPatchParameters, - KubernetesClustersUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided Kubernetes cluster, or update the tags associated with the Kubernetes cluster. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/KubernetesClusters_Patch.json - */ -async function patchKubernetesCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const kubernetesClusterName = "kubernetesClusterName"; - const kubernetesClusterUpdateParameters: KubernetesClusterPatchParameters = { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - controlPlaneNodeConfiguration: { - administratorConfiguration: { - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - }, - count: 3, - }, - kubernetesVersion: "1.XX.Y", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: KubernetesClustersUpdateOptionalParams = { - kubernetesClusterUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.kubernetesClusters.beginUpdateAndWait( - resourceGroupName, - kubernetesClusterName, - options, - ); - console.log(result); -} - -async function main() { - patchKubernetesCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksCreateOrUpdateSample.ts deleted file mode 100644 index 31bec9c2b227..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { L2Network, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new layer 2 (L2) network or update the properties of the existing network. - * - * @summary Create a new layer 2 (L2) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Create.json - */ -async function createOrUpdateL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkParameters: L2Network = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - hybridAksPluginType: "DPDK", - interfaceName: "eth0", - l2IsolationDomainId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l2NetworkName, - l2NetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksDeleteSample.ts deleted file mode 100644 index 37c1b4b6eedd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided layer 2 (L2) network. - * - * @summary Delete the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Delete.json - */ -async function deleteL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.beginDeleteAndWait( - resourceGroupName, - l2NetworkName, - ); - console.log(result); -} - -async function main() { - deleteL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksGetSample.ts deleted file mode 100644 index a0164a1024e9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided layer 2 (L2) network. - * - * @summary Get properties of the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Get.json - */ -async function getL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.get(resourceGroupName, l2NetworkName); - console.log(result); -} - -async function main() { - getL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListByResourceGroupSample.ts deleted file mode 100644 index cce081fb9f82..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided resource group. - * - * @summary Get a list of layer 2 (L2) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListByResourceGroup.json - */ -async function listL2NetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l2Networks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL2NetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListBySubscriptionSample.ts deleted file mode 100644 index 97e4c5fd1ee4..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of layer 2 (L2) networks in the provided subscription. - * - * @summary Get a list of layer 2 (L2) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_ListBySubscription.json - */ -async function listL2NetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l2Networks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL2NetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksUpdateSample.ts deleted file mode 100644 index 5b774ff6c176..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l2NetworksUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - L2NetworkPatchParameters, - L2NetworksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update tags associated with the provided layer 2 (L2) network. - * - * @summary Update tags associated with the provided layer 2 (L2) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L2Networks_Patch.json - */ -async function patchL2Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l2NetworkName = "l2NetworkName"; - const l2NetworkUpdateParameters: L2NetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: L2NetworksUpdateOptionalParams = { l2NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l2Networks.update( - resourceGroupName, - l2NetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchL2Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksCreateOrUpdateSample.ts deleted file mode 100644 index c68e1554a0ea..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksCreateOrUpdateSample.ts +++ /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. -import { L3Network, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new layer 3 (L3) network or update the properties of the existing network. - * - * @summary Create a new layer 3 (L3) network or update the properties of the existing network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Create.json - */ -async function createOrUpdateL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkParameters: L3Network = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - ipAllocationType: "DualStack", - ipv4ConnectedPrefix: "198.51.100.0/24", - ipv6ConnectedPrefix: "2001:db8::/64", - l3IsolationDomainId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlan: 12, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginCreateOrUpdateAndWait( - resourceGroupName, - l3NetworkName, - l3NetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksDeleteSample.ts deleted file mode 100644 index 3beb09b522eb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided layer 3 (L3) network. - * - * @summary Delete the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Delete.json - */ -async function deleteL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.beginDeleteAndWait( - resourceGroupName, - l3NetworkName, - ); - console.log(result); -} - -async function main() { - deleteL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksGetSample.ts deleted file mode 100644 index 6c0bf9238e23..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided layer 3 (L3) network. - * - * @summary Get properties of the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Get.json - */ -async function getL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.get(resourceGroupName, l3NetworkName); - console.log(result); -} - -async function main() { - getL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListByResourceGroupSample.ts deleted file mode 100644 index ef5ace2744b7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided resource group. - * - * @summary Get a list of layer 3 (L3) networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListByResourceGroup.json - */ -async function listL3NetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l3Networks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL3NetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListBySubscriptionSample.ts deleted file mode 100644 index 40e7098f0c59..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of layer 3 (L3) networks in the provided subscription. - * - * @summary Get a list of layer 3 (L3) networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_ListBySubscription.json - */ -async function listL3NetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.l3Networks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listL3NetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksUpdateSample.ts deleted file mode 100644 index f4c5d4c6c08c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/l3NetworksUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - L3NetworkPatchParameters, - L3NetworksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update tags associated with the provided layer 3 (L3) network. - * - * @summary Update tags associated with the provided layer 3 (L3) network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/L3Networks_Patch.json - */ -async function patchL3Network() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const l3NetworkName = "l3NetworkName"; - const l3NetworkUpdateParameters: L3NetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: L3NetworksUpdateOptionalParams = { l3NetworkUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.l3Networks.update( - resourceGroupName, - l3NetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchL3Network(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts deleted file mode 100644 index 5fe9b61cf0c5..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsCreateOrUpdateSample.ts +++ /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. -import { - ClusterMetricsConfiguration, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create new or update the existing metrics configuration of the provided cluster. - * - * @summary Create new or update the existing metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Create.json - */ -async function createOrUpdateMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationParameters: ClusterMetricsConfiguration = { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - metricsConfigurationParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsDeleteSample.ts deleted file mode 100644 index 59d304855e81..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the metrics configuration of the provided cluster. - * - * @summary Delete the metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Delete.json - */ -async function deleteMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginDeleteAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main() { - deleteMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsGetSample.ts deleted file mode 100644 index 73d0ae2712da..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get metrics configuration of the provided cluster. - * - * @summary Get metrics configuration of the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Get.json - */ -async function getMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.get( - resourceGroupName, - clusterName, - metricsConfigurationName, - ); - console.log(result); -} - -async function main() { - getMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsListByClusterSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsListByClusterSample.ts deleted file mode 100644 index 71c61471d3d8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsListByClusterSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of metrics configurations for the provided cluster. - * - * @summary Get a list of metrics configurations for the provided cluster. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_ListByCluster.json - */ -async function listMetricsConfigurationsOfTheCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricsConfigurations.listByCluster( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricsConfigurationsOfTheCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsUpdateSample.ts deleted file mode 100644 index 4cdc8ee1ae35..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/metricsConfigurationsUpdateSample.ts +++ /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. -import { - ClusterMetricsConfigurationPatchParameters, - MetricsConfigurationsUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * - * @summary Patch properties of metrics configuration for the provided cluster, or update the tags associated with it. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/ClusterMetricsConfigurations_Patch.json - */ -async function patchMetricsConfigurationOfCluster() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const clusterName = "clusterName"; - const metricsConfigurationName = "default"; - const metricsConfigurationUpdateParameters: ClusterMetricsConfigurationPatchParameters = - { - collectionInterval: 15, - enabledMetrics: ["metric1", "metric2"], - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: MetricsConfigurationsUpdateOptionalParams = { - metricsConfigurationUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.metricsConfigurations.beginUpdateAndWait( - resourceGroupName, - clusterName, - metricsConfigurationName, - options, - ); - console.log(result); -} - -async function main() { - patchMetricsConfigurationOfCluster(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/operationsListSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index 68353b739071..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * - * @summary Get a list of all available resource provider operations. It contains a URL link to get the next set of results. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Operations_List.json - */ -async function listResourceProviderOperations() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listResourceProviderOperations(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusGetSample.ts deleted file mode 100644 index e3f8ff2effeb..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the properties of the provided rack SKU. - * - * @summary Get the properties of the provided rack SKU. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_Get.json - */ -async function getRackSkuResource() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const rackSkuName = "rackSkuName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.rackSkus.get(rackSkuName); - console.log(result); -} - -async function main() { - getRackSkuResource(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusListBySubscriptionSample.ts deleted file mode 100644 index be1d7a2aefec..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/rackSkusListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of rack SKUs in the provided subscription. - * - * @summary Get a list of rack SKUs in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/RackSkus_ListBySubscription.json - */ -async function listRackSkUsForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.rackSkus.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRackSkUsForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksCreateOrUpdateSample.ts deleted file mode 100644 index 7412607e52bd..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksCreateOrUpdateSample.ts +++ /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. -import { Rack, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new rack or update properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new rack or update properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Create.json - */ -async function createOrUpdateRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackParameters: Rack = { - availabilityZone: "1", - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackLocation: "Rack 28", - rackSerialNumber: "RACK_SERIAL_NUMBER", - rackSkuId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/rackSkus/rackSkuName", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginCreateOrUpdateAndWait( - resourceGroupName, - rackName, - rackParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksDeleteSample.ts deleted file mode 100644 index 90376d4e75fa..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided rack. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided rack. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Delete.json - */ -async function deleteRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginDeleteAndWait( - resourceGroupName, - rackName, - ); - console.log(result); -} - -async function main() { - deleteRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksGetSample.ts deleted file mode 100644 index 88af1a48508f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided rack. - * - * @summary Get properties of the provided rack. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Get.json - */ -async function getRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.get(resourceGroupName, rackName); - console.log(result); -} - -async function main() { - getRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListByResourceGroupSample.ts deleted file mode 100644 index 2149fd803f10..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListByResourceGroupSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of racks in the provided resource group. - * - * @summary Get a list of racks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListByResourceGroup.json - */ -async function listRacksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.racks.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRacksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListBySubscriptionSample.ts deleted file mode 100644 index 6ad4e42aeec6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of racks in the provided subscription. - * - * @summary Get a list of racks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_ListBySubscription.json - */ -async function listRacksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.racks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listRacksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksUpdateSample.ts deleted file mode 100644 index 0127fe811192..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/racksUpdateSample.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 { - RackPatchParameters, - RacksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * - * @summary Patch properties of the provided rack, or update the tags associated with the rack. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Racks_Patch.json - */ -async function patchRack() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const rackName = "rackName"; - const rackUpdateParameters: RackPatchParameters = { - rackLocation: "Rack 2B", - rackSerialNumber: "RACK_SERIAL_NUMBER", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: RacksUpdateOptionalParams = { rackUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.racks.beginUpdateAndWait( - resourceGroupName, - rackName, - options, - ); - console.log(result); -} - -async function main() { - patchRack(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesCreateOrUpdateSample.ts deleted file mode 100644 index 44ec1a8ad608..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { StorageAppliance, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new storage appliance or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Create a new storage appliance or update the properties of the existing one. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Create.json - */ -async function createOrUpdateStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceParameters: StorageAppliance = { - administratorCredentials: { password: "{password}", username: "adminUser" }, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - rackId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - rackSlot: 1, - serialNumber: "BM1219XXX", - storageApplianceSkuId: "684E-3B16-399E", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginCreateOrUpdateAndWait( - resourceGroupName, - storageApplianceName, - storageApplianceParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDeleteSample.ts deleted file mode 100644 index d507feb3877f..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided storage appliance. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * - * @summary Delete the provided storage appliance. -All customer initiated requests will be rejected as the life cycle of this resource is managed by the system. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Delete.json - */ -async function deleteStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginDeleteAndWait( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - deleteStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts deleted file mode 100644 index a3768dc42274..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesDisableRemoteVendorManagementSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Disable remote vendor management of the provided storage appliance. - * - * @summary Disable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_DisableRemoteVendorManagement.json - */ -async function turnOffRemoteVendorManagementForStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.storageAppliances.beginDisableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - turnOffRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.ts deleted file mode 100644 index 47ae73681018..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesEnableRemoteVendorManagementSample.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 { - StorageApplianceEnableRemoteVendorManagementParameters, - StorageAppliancesEnableRemoteVendorManagementOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Enable remote vendor management of the provided storage appliance. - * - * @summary Enable remote vendor management of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_EnableRemoteVendorManagement.json - */ -async function turnOnRemoteVendorManagementForStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceEnableRemoteVendorManagementParameters: StorageApplianceEnableRemoteVendorManagementParameters = - { supportEndpoints: ["10.0.0.0/24"] }; - const options: StorageAppliancesEnableRemoteVendorManagementOptionalParams = { - storageApplianceEnableRemoteVendorManagementParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = - await client.storageAppliances.beginEnableRemoteVendorManagementAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main() { - turnOnRemoteVendorManagementForStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesGetSample.ts deleted file mode 100644 index 9fafa9fb064c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided storage appliance. - * - * @summary Get properties of the provided storage appliance. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Get.json - */ -async function getStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.get( - resourceGroupName, - storageApplianceName, - ); - console.log(result); -} - -async function main() { - getStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListByResourceGroupSample.ts deleted file mode 100644 index 1cd278e26780..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of storage appliances in the provided resource group. - * - * @summary Get a list of storage appliances in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListByResourceGroup.json - */ -async function listStorageAppliancesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageAppliances.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageAppliancesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListBySubscriptionSample.ts deleted file mode 100644 index 6b50c519f6b1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of storage appliances in the provided subscription. - * - * @summary Get a list of storage appliances in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_ListBySubscription.json - */ -async function listStorageAppliancesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.storageAppliances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listStorageAppliancesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesUpdateSample.ts deleted file mode 100644 index 65a42d54e8e1..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/storageAppliancesUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - StorageAppliancePatchParameters, - StorageAppliancesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * - * @summary Update properties of the provided storage appliance, or update tags associated with the storage appliance Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/StorageAppliances_Patch.json - */ -async function patchStorageAppliance() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const storageApplianceName = "storageApplianceName"; - const storageApplianceUpdateParameters: StorageAppliancePatchParameters = { - serialNumber: "BM1219XXX", - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: StorageAppliancesUpdateOptionalParams = { - storageApplianceUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.storageAppliances.beginUpdateAndWait( - resourceGroupName, - storageApplianceName, - options, - ); - console.log(result); -} - -async function main() { - patchStorageAppliance(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksCreateOrUpdateSample.ts deleted file mode 100644 index 002ecbff0210..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { TrunkedNetwork, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new trunked network or update the properties of the existing trunked network. - * - * @summary Create a new trunked network or update the properties of the existing trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Create.json - */ -async function createOrUpdateTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkParameters: TrunkedNetwork = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - interfaceName: "eth0", - isolationDomainIds: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/l2IsolationDomainName", - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/l3IsolationDomainName", - ], - location: "location", - tags: { key1: "myvalue1", key2: "myvalue2" }, - vlans: [12, 14], - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginCreateOrUpdateAndWait( - resourceGroupName, - trunkedNetworkName, - trunkedNetworkParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksDeleteSample.ts deleted file mode 100644 index e18a0529774a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided trunked network. - * - * @summary Delete the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Delete.json - */ -async function deleteTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.beginDeleteAndWait( - resourceGroupName, - trunkedNetworkName, - ); - console.log(result); -} - -async function main() { - deleteTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksGetSample.ts deleted file mode 100644 index f2b5e9a4c810..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided trunked network. - * - * @summary Get properties of the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Get.json - */ -async function getTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.get( - resourceGroupName, - trunkedNetworkName, - ); - console.log(result); -} - -async function main() { - getTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListByResourceGroupSample.ts deleted file mode 100644 index 5a184c74e367..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of trunked networks in the provided resource group. - * - * @summary Get a list of trunked networks in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListByResourceGroup.json - */ -async function listTrunkedNetworksForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.trunkedNetworks.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listTrunkedNetworksForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListBySubscriptionSample.ts deleted file mode 100644 index e8259d15f164..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of trunked networks in the provided subscription. - * - * @summary Get a list of trunked networks in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_ListBySubscription.json - */ -async function listTrunkedNetworksForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.trunkedNetworks.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listTrunkedNetworksForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksUpdateSample.ts deleted file mode 100644 index 207a9c3ed034..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/trunkedNetworksUpdateSample.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 { - TrunkedNetworkPatchParameters, - TrunkedNetworksUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update tags associated with the provided trunked network. - * - * @summary Update tags associated with the provided trunked network. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/TrunkedNetworks_Patch.json - */ -async function patchTrunkedNetwork() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const trunkedNetworkName = "trunkedNetworkName"; - const trunkedNetworkUpdateParameters: TrunkedNetworkPatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: TrunkedNetworksUpdateOptionalParams = { - trunkedNetworkUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.trunkedNetworks.update( - resourceGroupName, - trunkedNetworkName, - options, - ); - console.log(result); -} - -async function main() { - patchTrunkedNetwork(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesCreateOrUpdateSample.ts deleted file mode 100644 index 16e1e2e95c95..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesCreateOrUpdateSample.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { VirtualMachine, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new virtual machine or update the properties of the existing virtual machine. - * - * @summary Create a new virtual machine or update the properties of the existing virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Create.json - */ -async function createOrUpdateVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineParameters: VirtualMachine = { - adminUsername: "username", - bootMethod: "UEFI", - cloudServicesNetworkAttachment: { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/cloudServicesNetworks/cloudServicesNetworkName", - ipAllocationMethod: "Dynamic", - }, - cpuCores: 2, - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - memorySizeGB: 8, - networkAttachments: [ - { - attachedNetworkId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName", - defaultGateway: "True", - ipAllocationMethod: "Dynamic", - ipv4Address: "198.51.100.1", - ipv6Address: "2001:0db8:0000:0000:0000:0000:0000:0000", - networkAttachmentName: "netAttachName01", - }, - ], - networkData: "bmV0d29ya0RhdGVTYW1wbGU=", - placementHints: [ - { - hintType: "Affinity", - resourceId: - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName", - schedulingExecution: "Hard", - scope: "", - }, - ], - sshPublicKeys: [ - { - keyData: - "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm", - }, - ], - storageProfile: { - osDisk: { - createOption: "Ephemeral", - deleteOption: "Delete", - diskSizeGB: 120, - }, - volumeAttachments: [ - "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName", - ], - }, - tags: { key1: "myvalue1", key2: "myvalue2" }, - userData: "dXNlckRhdGVTYW1wbGU=", - vmDeviceModel: "T2", - vmImage: "myacr.azurecr.io/foobar:latest", - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginCreateOrUpdateAndWait( - resourceGroupName, - virtualMachineName, - virtualMachineParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesDeleteSample.ts deleted file mode 100644 index 2554394d6ebe..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided virtual machine. - * - * @summary Delete the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Delete.json - */ -async function deleteVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginDeleteAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - deleteVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesGetSample.ts deleted file mode 100644 index 229cb0ff9010..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided virtual machine. - * - * @summary Get properties of the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Get.json - */ -async function getVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.get( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - getVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts deleted file mode 100644 index 0031a31b1973..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of virtual machines in the provided resource group. - * - * @summary Get a list of virtual machines in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListByResourceGroup.json - */ -async function listVirtualMachinesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListBySubscriptionSample.ts deleted file mode 100644 index 0e6ac5e7fb12..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of virtual machines in the provided subscription. - * - * @summary Get a list of virtual machines in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_ListBySubscription.json - */ -async function listVirtualMachinesForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.virtualMachines.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVirtualMachinesForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesPowerOffSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesPowerOffSample.ts deleted file mode 100644 index c3a9b1dd89ea..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesPowerOffSample.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 { - VirtualMachinePowerOffParameters, - VirtualMachinesPowerOffOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Power off the provided virtual machine. - * - * @summary Power off the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_PowerOff.json - */ -async function powerOffVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachinePowerOffParameters: VirtualMachinePowerOffParameters = { - skipShutdown: "True", - }; - const options: VirtualMachinesPowerOffOptionalParams = { - virtualMachinePowerOffParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginPowerOffAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - powerOffVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesReimageSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesReimageSample.ts deleted file mode 100644 index 46f8cf3aeb7c..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesReimageSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Reimage the provided virtual machine. - * - * @summary Reimage the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Reimage.json - */ -async function reimageVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginReimageAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - reimageVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesRestartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesRestartSample.ts deleted file mode 100644 index 07933531d444..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesRestartSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Restart the provided virtual machine. - * - * @summary Restart the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Restart.json - */ -async function restartVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginRestartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - restartVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesStartSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesStartSample.ts deleted file mode 100644 index 6f8b0a3a5696..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesStartSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start the provided virtual machine. - * - * @summary Start the provided virtual machine. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Start.json - */ -async function startVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginStartAndWait( - resourceGroupName, - virtualMachineName, - ); - console.log(result); -} - -async function main() { - startVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesUpdateSample.ts deleted file mode 100644 index 5bbe8699eee7..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/virtualMachinesUpdateSample.ts +++ /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. -import { - VirtualMachinePatchParameters, - VirtualMachinesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. - * - * @summary Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/VirtualMachines_Patch.json - */ -async function patchVirtualMachine() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const virtualMachineName = "virtualMachineName"; - const virtualMachineUpdateParameters: VirtualMachinePatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - vmImageRepositoryCredentials: { - password: "{password}", - registryUrl: "myacr.azurecr.io", - username: "myuser", - }, - }; - const options: VirtualMachinesUpdateOptionalParams = { - virtualMachineUpdateParameters, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.virtualMachines.beginUpdateAndWait( - resourceGroupName, - virtualMachineName, - options, - ); - console.log(result); -} - -async function main() { - patchVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesCreateOrUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesCreateOrUpdateSample.ts deleted file mode 100644 index 8ef7a264a3d6..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { Volume, NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new volume or update the properties of the existing one. - * - * @summary Create a new volume or update the properties of the existing one. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Create.json - */ -async function createOrUpdateVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeParameters: Volume = { - extendedLocation: { - name: "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName", - type: "CustomLocation", - }, - location: "location", - sizeMiB: 10000, - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginCreateOrUpdateAndWait( - resourceGroupName, - volumeName, - volumeParameters, - ); - console.log(result); -} - -async function main() { - createOrUpdateVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesDeleteSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesDeleteSample.ts deleted file mode 100644 index 714bbc1b5e3d..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesDeleteSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete the provided volume. - * - * @summary Delete the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Delete.json - */ -async function deleteVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.beginDeleteAndWait( - resourceGroupName, - volumeName, - ); - console.log(result); -} - -async function main() { - deleteVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesGetSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesGetSample.ts deleted file mode 100644 index ba640c877a79..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesGetSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get properties of the provided volume. - * - * @summary Get properties of the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Get.json - */ -async function getVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.get(resourceGroupName, volumeName); - console.log(result); -} - -async function main() { - getVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListByResourceGroupSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListByResourceGroupSample.ts deleted file mode 100644 index 06d74ab0501a..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of volumes in the provided resource group. - * - * @summary Get a list of volumes in the provided resource group. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListByResourceGroup.json - */ -async function listVolumesForResourceGroup() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.volumes.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVolumesForResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListBySubscriptionSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListBySubscriptionSample.ts deleted file mode 100644 index dfcc9e784087..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesListBySubscriptionSample.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 { NetworkCloud } from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of volumes in the provided subscription. - * - * @summary Get a list of volumes in the provided subscription. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_ListBySubscription.json - */ -async function listVolumeForSubscription() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.volumes.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listVolumeForSubscription(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesUpdateSample.ts b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesUpdateSample.ts deleted file mode 100644 index 26ea1bc26850..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/src/volumesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - VolumePatchParameters, - VolumesUpdateOptionalParams, - NetworkCloud, -} from "@azure/arm-networkcloud"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update tags associated with the provided volume. - * - * @summary Update tags associated with the provided volume. - * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2024-06-01-preview/examples/Volumes_Patch.json - */ -async function patchVolume() { - const subscriptionId = - process.env["NETWORKCLOUD_SUBSCRIPTION_ID"] || - "123e4567-e89b-12d3-a456-426655440000"; - const resourceGroupName = - process.env["NETWORKCLOUD_RESOURCE_GROUP"] || "resourceGroupName"; - const volumeName = "volumeName"; - const volumeUpdateParameters: VolumePatchParameters = { - tags: { key1: "myvalue1", key2: "myvalue2" }, - }; - const options: VolumesUpdateOptionalParams = { volumeUpdateParameters }; - const credential = new DefaultAzureCredential(); - const client = new NetworkCloud(credential, subscriptionId); - const result = await client.volumes.update( - resourceGroupName, - volumeName, - options, - ); - console.log(result); -} - -async function main() { - patchVolume(); -} - -main().catch(console.error); diff --git a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/tsconfig.json b/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/networkcloud/arm-networkcloud/samples/v2-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/networkcloud/arm-networkcloud/src/models/index.ts b/sdk/networkcloud/arm-networkcloud/src/models/index.ts index 8a3bed5124e2..5b95219823d0 100644 --- a/sdk/networkcloud/arm-networkcloud/src/models/index.ts +++ b/sdk/networkcloud/arm-networkcloud/src/models/index.ts @@ -483,7 +483,7 @@ export interface BareMetalMachineConfigurationData { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly bmcConnectionString?: string; - /** The credentials of the baseboard management controller on this bare metal machine. */ + /** The credentials of the baseboard management controller on this bare metal machine. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ bmcCredentials: AdministrativeCredentials; /** The MAC address of the BMC for this machine. */ bmcMacAddress: string; @@ -504,7 +504,7 @@ export interface BareMetalMachineConfigurationData { /** StorageApplianceConfigurationData represents configuration for the storage application. */ export interface StorageApplianceConfigurationData { - /** The credentials of the administrative interface on this storage appliance. */ + /** The credentials of the administrative interface on this storage appliance. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ adminCredentials: AdministrativeCredentials; /** The slot that storage appliance is in the rack based on the BOM configuration. */ rackSlot: number; @@ -514,6 +514,22 @@ export interface StorageApplianceConfigurationData { storageApplianceName?: string; } +/** AnalyticsOutputSettings represents the settings for the log analytics workspace used for output of logs from this cluster. */ +export interface AnalyticsOutputSettings { + /** The resource ID of the analytics workspace that is to be used by the specified identity. */ + analyticsWorkspaceId?: string; + /** The selection of the managed identity to use with this analytics workspace. The identity type must be either system assigned or user assigned. */ + associatedIdentity?: IdentitySelector; +} + +/** IdentitySelector represents the selection of a managed identity for use. */ +export interface IdentitySelector { + /** The type of managed identity that is being selected. */ + identityType?: ManagedServiceIdentitySelectorType; + /** The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. */ + userAssignedIdentityResourceId?: string; +} + /** ClusterAvailableUpgradeVersion represents the various cluster upgrade parameters. */ export interface ClusterAvailableUpgradeVersion { /** @@ -588,14 +604,6 @@ export interface CommandOutputSettings { containerUrl?: string; } -/** IdentitySelector represents the selection of a managed identity for use. */ -export interface IdentitySelector { - /** The type of managed identity that is being selected. */ - identityType?: ManagedServiceIdentitySelectorType; - /** The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. */ - userAssignedIdentityResourceId?: string; -} - /** ValidationThreshold indicates allowed machine and node hardware and deployment failures. */ export interface ValidationThreshold { /** Selection of how the type evaluation is applied to the cluster calculation. */ @@ -620,6 +628,14 @@ export interface ClusterSecretArchive { useKeyVault?: ClusterSecretArchiveEnabled; } +/** SecretArchiveSettings represents the settings for the secret archive used to hold credentials for the cluster. */ +export interface SecretArchiveSettings { + /** The selection of the managed identity to use with this vault URI. The identity type must be either system assigned or user assigned. */ + associatedIdentity?: IdentitySelector; + /** The URI for the key vault used as the secret archive. */ + vaultUri?: string; +} + /** ClusterUpdateStrategy represents the strategy for updating the cluster. */ export interface ClusterUpdateStrategy { /** @@ -637,6 +653,12 @@ export interface ClusterUpdateStrategy { waitTimeMinutes?: number; } +/** VulnerabilityScanningSettings represents the settings for how security vulnerability scanning is applied to the cluster. */ +export interface VulnerabilityScanningSettings { + /** The mode selection for container vulnerability scanning. */ + containerScan?: VulnerabilityScanningSettingsContainerScan; +} + /** KubernetesClusterList represents a list of Kubernetes clusters. */ export interface KubernetesClusterList { /** The link used to get the next page of operations. */ @@ -1373,7 +1395,7 @@ export interface BareMetalMachinePowerOffParameters { /** BareMetalMachineReplaceParameters represents the body of the request to physically swap a bare metal machine for another. */ export interface BareMetalMachineReplaceParameters { - /** The credentials of the baseboard management controller on this bare metal machine. */ + /** The credentials of the baseboard management controller on this bare metal machine. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead. */ bmcCredentials?: AdministrativeCredentials; /** The MAC address of the BMC device. */ bmcMacAddress?: string; @@ -1454,6 +1476,8 @@ export interface ClusterPatchParameters { tags?: { [propertyName: string]: string }; /** The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. */ aggregatorOrSingleRackDefinition?: RackDefinition; + /** The settings for the log analytics workspace used for output of logs from this cluster. */ + analyticsOutputSettings?: AnalyticsOutputSettings; /** The customer-provided location information to identify where the cluster resides. */ clusterLocation?: string; /** The service principal to be used by the cluster during Arc Appliance installation. */ @@ -1471,8 +1495,18 @@ export interface ClusterPatchParameters { runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; /** The configuration for use of a key vault to store secrets for later retrieval by the operator. */ secretArchive?: ClusterSecretArchive; + /** The settings for the secret archive used to hold credentials for the cluster. */ + secretArchiveSettings?: SecretArchiveSettings; /** The strategy for updating the cluster. */ updateStrategy?: ClusterUpdateStrategy; + /** The settings for how security vulnerability scanning is applied to the cluster. */ + vulnerabilityScanningSettings?: VulnerabilityScanningSettingsPatch; +} + +/** VulnerabilityScanningSettingsPatch represents the settings for how security vulnerability scanning is applied to the cluster. */ +export interface VulnerabilityScanningSettingsPatch { + /** The mode selection for container vulnerability scanning. */ + containerScan?: VulnerabilityScanningSettingsContainerScan; } /** BareMetalMachineKeySetList represents a list of bare metal machine key sets. */ @@ -2074,7 +2108,9 @@ export interface Cluster extends TrackedResource { identity?: ManagedServiceIdentity; /** The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator rack in a multi-rack cluster. */ aggregatorOrSingleRackDefinition: RackDefinition; - /** The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. */ + /** The settings for the log analytics workspace used for output of logs from this cluster. */ + analyticsOutputSettings?: AnalyticsOutputSettings; + /** Field Deprecated. The resource ID of the Log Analytics Workspace that will be used for storing relevant logs. */ analyticsWorkspaceId?: string; /** * The list of cluster runtime version upgrades available for this cluster. @@ -2156,6 +2192,8 @@ export interface Cluster extends TrackedResource { runtimeProtectionConfiguration?: RuntimeProtectionConfiguration; /** The configuration for use of a key vault to store secrets for later retrieval by the operator. */ secretArchive?: ClusterSecretArchive; + /** The settings for the secret archive used to hold credentials for the cluster. */ + secretArchiveSettings?: SecretArchiveSettings; /** * The support end date of the runtime version of the cluster. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2163,6 +2201,8 @@ export interface Cluster extends TrackedResource { readonly supportExpiryDate?: string; /** The strategy for updating the cluster. */ updateStrategy?: ClusterUpdateStrategy; + /** The settings for how security vulnerability scanning is applied to the cluster. */ + vulnerabilityScanningSettings?: VulnerabilityScanningSettings; /** * The list of workload resource IDs that are hosted within this cluster. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2391,7 +2431,7 @@ export interface StorageAppliance extends TrackedResource { /** The credentials of the administrative interface on this storage appliance. */ administratorCredentials: AdministrativeCredentials; /** - * The total capacity of the storage appliance. + * The total capacity of the storage appliance. Measured in GiB. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly capacity?: number; @@ -2401,7 +2441,7 @@ export interface StorageAppliance extends TrackedResource { */ readonly capacityUsed?: number; /** - * The resource ID of the cluster this storage appliance is associated with. + * The resource ID of the cluster this storage appliance is associated with. Measured in GiB. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly clusterId?: string; @@ -2539,6 +2579,8 @@ export interface VirtualMachine extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly clusterId?: string; + /** The extended location to use for creation of a VM console resource. */ + consoleExtendedLocation?: ExtendedLocation; /** The number of CPU cores in the virtual machine. */ cpuCores: number; /** @@ -3641,6 +3683,24 @@ export enum KnownClusterManagerProvisioningState { */ export type ClusterManagerProvisioningState = string; +/** Known values of {@link ManagedServiceIdentitySelectorType} that the service accepts. */ +export enum KnownManagedServiceIdentitySelectorType { + /** SystemAssignedIdentity */ + SystemAssignedIdentity = "SystemAssignedIdentity", + /** UserAssignedIdentity */ + UserAssignedIdentity = "UserAssignedIdentity", +} + +/** + * Defines values for ManagedServiceIdentitySelectorType. \ + * {@link KnownManagedServiceIdentitySelectorType} can be used interchangeably with ManagedServiceIdentitySelectorType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SystemAssignedIdentity** \ + * **UserAssignedIdentity** + */ +export type ManagedServiceIdentitySelectorType = string; + /** Known values of {@link ControlImpact} that the service accepts. */ export enum KnownControlImpact { /** True */ @@ -3737,24 +3797,6 @@ export enum KnownClusterType { */ export type ClusterType = string; -/** Known values of {@link ManagedServiceIdentitySelectorType} that the service accepts. */ -export enum KnownManagedServiceIdentitySelectorType { - /** SystemAssignedIdentity */ - SystemAssignedIdentity = "SystemAssignedIdentity", - /** UserAssignedIdentity */ - UserAssignedIdentity = "UserAssignedIdentity", -} - -/** - * Defines values for ManagedServiceIdentitySelectorType. \ - * {@link KnownManagedServiceIdentitySelectorType} can be used interchangeably with ManagedServiceIdentitySelectorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SystemAssignedIdentity** \ - * **UserAssignedIdentity** - */ -export type ManagedServiceIdentitySelectorType = string; - /** Known values of {@link ValidationThresholdGrouping} that the service accepts. */ export enum KnownValidationThresholdGrouping { /** PerCluster */ @@ -3923,6 +3965,24 @@ export enum KnownClusterUpdateStrategyType { */ export type ClusterUpdateStrategyType = string; +/** Known values of {@link VulnerabilityScanningSettingsContainerScan} that the service accepts. */ +export enum KnownVulnerabilityScanningSettingsContainerScan { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", +} + +/** + * Defines values for VulnerabilityScanningSettingsContainerScan. \ + * {@link KnownVulnerabilityScanningSettingsContainerScan} can be used interchangeably with VulnerabilityScanningSettingsContainerScan, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** + */ +export type VulnerabilityScanningSettingsContainerScan = string; + /** Known values of {@link AvailabilityLifecycle} that the service accepts. */ export enum KnownAvailabilityLifecycle { /** Preview */ @@ -4609,10 +4669,12 @@ export type RackProvisioningState = string; /** Known values of {@link StorageApplianceDetailedStatus} that the service accepts. */ export enum KnownStorageApplianceDetailedStatus { - /** Error */ - Error = "Error", /** Available */ Available = "Available", + /** Degraded */ + Degraded = "Degraded", + /** Error */ + Error = "Error", /** Provisioning */ Provisioning = "Provisioning", } @@ -4622,8 +4684,9 @@ export enum KnownStorageApplianceDetailedStatus { * {@link KnownStorageApplianceDetailedStatus} can be used interchangeably with StorageApplianceDetailedStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Error** \ * **Available** \ + * **Degraded** \ + * **Error** \ * **Provisioning** */ export type StorageApplianceDetailedStatus = string; @@ -4918,8 +4981,10 @@ export type VirtualMachineProvisioningState = string; /** Known values of {@link OsDiskCreateOption} that the service accepts. */ export enum KnownOsDiskCreateOption { - /** Ephemeral */ + /** Utilize the local storage of the host machine. */ Ephemeral = "Ephemeral", + /** Utilize a storage appliance backed volume to host the disk. */ + Persistent = "Persistent", } /** @@ -4927,7 +4992,8 @@ export enum KnownOsDiskCreateOption { * {@link KnownOsDiskCreateOption} can be used interchangeably with OsDiskCreateOption, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Ephemeral** + * **Ephemeral**: Utilize the local storage of the host machine. \ + * **Persistent**: Utilize a storage appliance backed volume to host the disk. */ export type OsDiskCreateOption = string; @@ -4966,10 +5032,12 @@ export type VirtualMachineVirtioInterfaceType = string; /** Known values of {@link VirtualMachineDeviceModelType} that the service accepts. */ export enum KnownVirtualMachineDeviceModelType { - /** T1 */ + /** Traditional and most compatible device virtualization interface. */ T1 = "T1", - /** T2 */ + /** Modern and enhanced device virtualization interface. */ T2 = "T2", + /** Improved security and functionality (including TPM and secure boot support). */ + T3 = "T3", } /** @@ -4977,8 +5045,9 @@ export enum KnownVirtualMachineDeviceModelType { * {@link KnownVirtualMachineDeviceModelType} can be used interchangeably with VirtualMachineDeviceModelType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **T1** \ - * **T2** + * **T1**: Traditional and most compatible device virtualization interface. \ + * **T2**: Modern and enhanced device virtualization interface. \ + * **T3**: Improved security and functionality (including TPM and secure boot support). */ export type VirtualMachineDeviceModelType = string; diff --git a/sdk/networkcloud/arm-networkcloud/src/models/mappers.ts b/sdk/networkcloud/arm-networkcloud/src/models/mappers.ts index 05c9f9cb8c3d..9b59d9f36cd1 100644 --- a/sdk/networkcloud/arm-networkcloud/src/models/mappers.ts +++ b/sdk/networkcloud/arm-networkcloud/src/models/mappers.ts @@ -1111,6 +1111,50 @@ export const StorageApplianceConfigurationData: coreClient.CompositeMapper = { }, }; +export const AnalyticsOutputSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AnalyticsOutputSettings", + modelProperties: { + analyticsWorkspaceId: { + serializedName: "analyticsWorkspaceId", + type: { + name: "String", + }, + }, + associatedIdentity: { + serializedName: "associatedIdentity", + type: { + name: "Composite", + className: "IdentitySelector", + }, + }, + }, + }, +}; + +export const IdentitySelector: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentitySelector", + modelProperties: { + identityType: { + serializedName: "identityType", + type: { + name: "String", + }, + }, + userAssignedIdentityResourceId: { + serializedName: "userAssignedIdentityResourceId", + nullable: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const ClusterAvailableUpgradeVersion: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1278,27 +1322,6 @@ export const CommandOutputSettings: coreClient.CompositeMapper = { }, }; -export const IdentitySelector: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IdentitySelector", - modelProperties: { - identityType: { - serializedName: "identityType", - type: { - name: "String", - }, - }, - userAssignedIdentityResourceId: { - serializedName: "userAssignedIdentityResourceId", - type: { - name: "String", - }, - }, - }, - }, -}; - export const ValidationThreshold: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1371,6 +1394,28 @@ export const ClusterSecretArchive: coreClient.CompositeMapper = { }, }; +export const SecretArchiveSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretArchiveSettings", + modelProperties: { + associatedIdentity: { + serializedName: "associatedIdentity", + type: { + name: "Composite", + className: "IdentitySelector", + }, + }, + vaultUri: { + serializedName: "vaultUri", + type: { + name: "String", + }, + }, + }, + }, +}; + export const ClusterUpdateStrategy: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1424,6 +1469,21 @@ export const ClusterUpdateStrategy: coreClient.CompositeMapper = { }, }; +export const VulnerabilityScanningSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VulnerabilityScanningSettings", + modelProperties: { + containerScan: { + serializedName: "containerScan", + type: { + name: "String", + }, + }, + }, + }, +}; + export const KubernetesClusterList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3474,6 +3534,13 @@ export const ClusterPatchParameters: coreClient.CompositeMapper = { className: "RackDefinition", }, }, + analyticsOutputSettings: { + serializedName: "properties.analyticsOutputSettings", + type: { + name: "Composite", + className: "AnalyticsOutputSettings", + }, + }, clusterLocation: { serializedName: "properties.clusterLocation", type: { @@ -3527,6 +3594,13 @@ export const ClusterPatchParameters: coreClient.CompositeMapper = { className: "ClusterSecretArchive", }, }, + secretArchiveSettings: { + serializedName: "properties.secretArchiveSettings", + type: { + name: "Composite", + className: "SecretArchiveSettings", + }, + }, updateStrategy: { serializedName: "properties.updateStrategy", type: { @@ -3534,6 +3608,28 @@ export const ClusterPatchParameters: coreClient.CompositeMapper = { className: "ClusterUpdateStrategy", }, }, + vulnerabilityScanningSettings: { + serializedName: "properties.vulnerabilityScanningSettings", + type: { + name: "Composite", + className: "VulnerabilityScanningSettingsPatch", + }, + }, + }, + }, +}; + +export const VulnerabilityScanningSettingsPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VulnerabilityScanningSettingsPatch", + modelProperties: { + containerScan: { + serializedName: "containerScan", + type: { + name: "String", + }, + }, }, }, }; @@ -5132,6 +5228,13 @@ export const Cluster: coreClient.CompositeMapper = { className: "RackDefinition", }, }, + analyticsOutputSettings: { + serializedName: "properties.analyticsOutputSettings", + type: { + name: "Composite", + className: "AnalyticsOutputSettings", + }, + }, analyticsWorkspaceId: { serializedName: "properties.analyticsWorkspaceId", type: { @@ -5305,6 +5408,13 @@ export const Cluster: coreClient.CompositeMapper = { className: "ClusterSecretArchive", }, }, + secretArchiveSettings: { + serializedName: "properties.secretArchiveSettings", + type: { + name: "Composite", + className: "SecretArchiveSettings", + }, + }, supportExpiryDate: { serializedName: "properties.supportExpiryDate", readOnly: true, @@ -5319,6 +5429,13 @@ export const Cluster: coreClient.CompositeMapper = { className: "ClusterUpdateStrategy", }, }, + vulnerabilityScanningSettings: { + serializedName: "properties.vulnerabilityScanningSettings", + type: { + name: "Composite", + className: "VulnerabilityScanningSettings", + }, + }, workloadResourceIds: { serializedName: "properties.workloadResourceIds", readOnly: true, @@ -6167,6 +6284,13 @@ export const VirtualMachine: coreClient.CompositeMapper = { name: "String", }, }, + consoleExtendedLocation: { + serializedName: "properties.consoleExtendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation", + }, + }, cpuCores: { constraints: { InclusiveMinimum: 2, diff --git a/sdk/networkcloud/arm-networkcloud/src/models/parameters.ts b/sdk/networkcloud/arm-networkcloud/src/models/parameters.ts index 9b6d298ff310..90ab256b5782 100644 --- a/sdk/networkcloud/arm-networkcloud/src/models/parameters.ts +++ b/sdk/networkcloud/arm-networkcloud/src/models/parameters.ts @@ -90,7 +90,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-06-01-preview", + defaultValue: "2024-10-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/networkcloud/arm-networkcloud/src/networkCloud.ts b/sdk/networkcloud/arm-networkcloud/src/networkCloud.ts index c838cae6979e..fafba757e128 100644 --- a/sdk/networkcloud/arm-networkcloud/src/networkCloud.ts +++ b/sdk/networkcloud/arm-networkcloud/src/networkCloud.ts @@ -92,7 +92,7 @@ export class NetworkCloud extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-networkcloud/2.0.0-beta.2`; + const packageDetails = `azsdk-js-arm-networkcloud/1.1.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -146,7 +146,7 @@ export class NetworkCloud extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-06-01-preview"; + this.apiVersion = options.apiVersion || "2024-10-01-preview"; this.operations = new OperationsImpl(this); this.bareMetalMachines = new BareMetalMachinesImpl(this); this.cloudServicesNetworks = new CloudServicesNetworksImpl(this); diff --git a/sdk/networkcloud/arm-networkcloud/test/networkcloud_operations_test.spec.ts b/sdk/networkcloud/arm-networkcloud/test/networkcloud_operations_test.spec.ts deleted file mode 100644 index 9cddefbdd5d9..000000000000 --- a/sdk/networkcloud/arm-networkcloud/test/networkcloud_operations_test.spec.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { NetworkCloud } from "../src/networkCloud"; - -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, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("NetworkCloud test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: NetworkCloud; - let location: string; - let resourceGroup: string; - let resourcename: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new NetworkCloud(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("operation list test", async function () { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); -}) diff --git a/sdk/networkcloud/arm-networkcloud/test/sampleTest.ts b/sdk/networkcloud/arm-networkcloud/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/networkcloud/arm-networkcloud/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +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 (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/networkcloud/arm-networkcloud/tsconfig.json b/sdk/networkcloud/arm-networkcloud/tsconfig.json index c1f892855c72..b35d05ad6e9d 100644 --- a/sdk/networkcloud/arm-networkcloud/tsconfig.json +++ b/sdk/networkcloud/arm-networkcloud/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-networkcloud": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "src/**/*.ts", - "test/**/*.ts", - "samples-dev/**/*.ts" + "test/**/*.ts" ], "exclude": [ "node_modules"