mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
25 lines
806 B
TypeScript
25 lines
806 B
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to Get lab.
|
|
*
|
|
* @summary Get lab.
|
|
* x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Get.json
|
|
*/
|
|
|
|
import { DevTestLabsClient } from "@azure/arm-devtestlabs";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function labsGet(): Promise<void> {
|
|
const subscriptionId = "{subscriptionId}";
|
|
const resourceGroupName = "resourceGroupName";
|
|
const name = "{labName}";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new DevTestLabsClient(credential, subscriptionId);
|
|
const result = await client.labs.get(resourceGroupName, name);
|
|
console.log(result);
|
|
}
|
|
|
|
labsGet().catch(console.error);
|