mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
25 lines
1.0 KiB
TypeScript
25 lines
1.0 KiB
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to Gets the Visual Studio Team Services account resource details.
|
|
*
|
|
* @summary Gets the Visual Studio Team Services account resource details.
|
|
* x-ms-original-file: specification/visualstudio/resource-manager/Microsoft.VisualStudio/preview/2014-04-01-preview/examples/GetResource.json
|
|
*/
|
|
|
|
import { VisualStudioResourceProviderClient } from "@azure/arm-visualstudio";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function getAnAccountResource(): Promise<void> {
|
|
const subscriptionId = "0de7f055-dbea-498d-8e9e-da287eedca90";
|
|
const resourceGroupName = "VS-Example-Group";
|
|
const resourceName = "Example";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new VisualStudioResourceProviderClient(credential, subscriptionId);
|
|
const result = await client.accounts.get(resourceGroupName, resourceName);
|
|
console.log(result);
|
|
}
|
|
|
|
getAnAccountResource().catch(console.error);
|