Files

27 lines
1.0 KiB
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Allows modifying tags of labs. All other properties will be ignored.
*
* @summary Allows modifying tags of labs. All other properties will be ignored.
* x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Update.json
*/
import type { LabFragment } from "@azure/arm-devtestlabs";
import { DevTestLabsClient } from "@azure/arm-devtestlabs";
import { DefaultAzureCredential } from "@azure/identity";
async function labsUpdate(): Promise<void> {
const subscriptionId = "{subscriptionId}";
const resourceGroupName = "resourceGroupName";
const name = "{labName}";
const lab: LabFragment = {};
const credential = new DefaultAzureCredential();
const client = new DevTestLabsClient(credential, subscriptionId);
const result = await client.labs.update(resourceGroupName, name, lab);
console.log(result);
}
labsUpdate().catch(console.error);