This pull request updates the Node.js version requirement across multiple files and tools in the repository. The changes ensure compatibility with Node.js version 22 and its corresponding type definitions. Resolves #37945. ***NO_CI***
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 |
|---|---|
| checkUpdateForAnOperationalizationCluster.js | Checks if updates are available for system services in the cluster. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CheckSystemServicesUpdatesAvailable.json |
| deleteOperationalizationCluster.js | Deletes the specified cluster. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Delete.json |
| getOperationalizationCluster.js | Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call ListKeys to get them. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Get.json |
| listKeysOfAnOperationalizationCluster.js | Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running operation because it fetches keys from dependencies. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListKeys.json |
| listOperationalizationClustersByResourceGroup.js | Gets the clusters in the specified resource group. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListByResourceGroup.json |
| listOperationalizationClustersBySubscription.js | Gets the operationalization clusters in the specified subscription. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListBySubscription.json |
| machineLearningComputeListAvailableOperations.js | Gets all available operations. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/MachineLearningCompute_ListAvailableOperations.json |
| machineLearningComputeListAvailableOperationsSample.js | Gets all available operations. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/MachineLearningCompute_ListAvailableOperations.json |
| operationalizationClustersCheckSystemServicesUpdatesAvailableSample.js | Checks if updates are available for system services in the cluster. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CheckSystemServicesUpdatesAvailable.json |
| operationalizationClustersCreateOrUpdateSample.js | Create or update an operationalization cluster. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CreateOrUpdate.json |
| operationalizationClustersDeleteSample.js | Deletes the specified cluster. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Delete.json |
| operationalizationClustersGetSample.js | Gets the operationalization cluster resource view. Note that the credentials are not returned by this call. Call ListKeys to get them. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Get.json |
| operationalizationClustersListByResourceGroupSample.js | Gets the clusters in the specified resource group. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListByResourceGroup.json |
| operationalizationClustersListBySubscriptionIdSample.js | Gets the operationalization clusters in the specified subscription. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListBySubscription.json |
| operationalizationClustersListKeysSample.js | Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This is a long running operation because it fetches keys from dependencies. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_ListKeys.json |
| operationalizationClustersUpdateSample.js | The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Update.json |
| operationalizationClustersUpdateSystemServicesSample.js | Updates system services in a cluster. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_UpdateSystemServices.json |
| patchOperationalizationCluster.js | The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_Update.json |
| putOperationalizationCluster.js | Create or update an operationalization cluster. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_CreateOrUpdate.json |
| updateSystemServicesInAnOperationalizationCluster.js | Updates system services in a cluster. x-ms-original-file: specification/machinelearningcompute/resource-manager/Microsoft.MachineLearningCompute/preview/2017-08-01-preview/examples/OperationalizationClusters_UpdateSystemServices.json |
Prerequisites
The sample programs are compatible with LTS versions of Node.js.
You need an Azure subscription 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.
Setup
To run the samples using the published version of the package:
- Install the dependencies using
npm:
npm install
-
Edit the file
sample.env, adding the correct credentials to access the Azure service and run the samples. Then rename the file fromsample.envto just.env. The sample programs will read this file automatically. -
Run whichever samples you like (note that some samples may require additional setup, see the table above):
node checkUpdateForAnOperationalizationCluster.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):
cross-env node checkUpdateForAnOperationalizationCluster.js
Next Steps
Take a look at our API Documentation for more information about the APIs that are available in the clients.