mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
31 lines
1.3 KiB
TypeScript
31 lines
1.3 KiB
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to Updates a machine learning workspace with the specified parameters.
|
|
*
|
|
* @summary Updates a machine learning workspace with the specified parameters.
|
|
* x-ms-original-file: specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2019-10-01/examples/UpdateWorkspace.json
|
|
*/
|
|
|
|
import type { WorkspaceUpdateParameters } from "@azure/arm-workspaces";
|
|
import { MachineLearningWorkspacesManagementClient } from "@azure/arm-workspaces";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function workspaceUpdate(): Promise<void> {
|
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
const resourceGroupName = "myResourceGroup";
|
|
const workspaceName = "testworkspace";
|
|
const parameters: WorkspaceUpdateParameters = {
|
|
keyVaultIdentifierId: "kvidnew",
|
|
sku: { name: "Enterprise", tier: "Enterprise" },
|
|
tags: { tagKey1: "TagValue1" },
|
|
};
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new MachineLearningWorkspacesManagementClient(credential, subscriptionId);
|
|
const result = await client.workspaces.update(resourceGroupName, workspaceName, parameters);
|
|
console.log(result);
|
|
}
|
|
|
|
workspaceUpdate().catch(console.error);
|