mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
33 lines
1.4 KiB
TypeScript
33 lines
1.4 KiB
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to update other properties.
|
|
*
|
|
* @summary 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
|
|
*/
|
|
|
|
import type { OperationalizationClusterUpdateParameters } from "@azure/arm-machinelearningcompute";
|
|
import { MachineLearningComputeManagementClient } from "@azure/arm-machinelearningcompute";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function patchOperationalizationCluster(): Promise<void> {
|
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
const resourceGroupName = "myResourceGroup";
|
|
const clusterName = "myCluster";
|
|
const parameters: OperationalizationClusterUpdateParameters = {
|
|
tags: { key1: "value1" },
|
|
};
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new MachineLearningComputeManagementClient(credential, subscriptionId);
|
|
const result = await client.operationalizationClusters.update(
|
|
resourceGroupName,
|
|
clusterName,
|
|
parameters,
|
|
);
|
|
console.log(result);
|
|
}
|
|
|
|
patchOperationalizationCluster().catch(console.error);
|