Files
azure-sdk-for-js/sdk/devtestlabs/arm-devtestlabs/samples-dev/virtualMachinesGetRdpFileContentsSample.ts

26 lines
1.1 KiB
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Gets a string that represents the contents of the RDP file for the virtual machine
*
* @summary Gets a string that represents the contents of the RDP file for the virtual machine
* x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_GetRdpFileContents.json
*/
import { DevTestLabsClient } from "@azure/arm-devtestlabs";
import { DefaultAzureCredential } from "@azure/identity";
async function virtualMachinesGetRdpFileContents(): Promise<void> {
const subscriptionId = "{subscriptionId}";
const resourceGroupName = "resourceGroupName";
const labName = "{labName}";
const name = "{vmName}";
const credential = new DefaultAzureCredential();
const client = new DevTestLabsClient(credential, subscriptionId);
const result = await client.virtualMachines.getRdpFileContents(resourceGroupName, labName, name);
console.log(result);
}
virtualMachinesGetRdpFileContents().catch(console.error);