mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
Configurations: 'specification/databricks/resource-manager/Microsoft.Databricks/Databricks/tspconfig.yaml', API Version: 2026-01-01, SDK Release Type: beta, and CommitSHA: '7eedf0843327d688a23ed89a7c2921cbfc129dfe' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6406225 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --------- Co-authored-by: Jiao Di (MSFT) <[email protected]>
26 lines
918 B
TypeScript
26 lines
918 B
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
import { AzureDatabricksManagementClient } from "@azure/arm-databricks";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
/**
|
|
* This sample demonstrates how to gets the workspace vNet Peering.
|
|
*
|
|
* @summary gets the workspace vNet Peering.
|
|
* x-ms-original-file: 2026-01-01/WorkspaceVirtualNetPeeringGet.json
|
|
*/
|
|
async function getAWorkspaceWithVNetPeeringConfigured(): Promise<void> {
|
|
const credential = new DefaultAzureCredential();
|
|
const subscriptionId = "0140911e-1040-48da-8bc9-b99fb3dd88a6/";
|
|
const client = new AzureDatabricksManagementClient(credential, subscriptionId);
|
|
const result = await client.vNetPeering.get("subramantest", "adbworkspace", "vNetPeeringTest");
|
|
console.log(result);
|
|
}
|
|
|
|
async function main(): Promise<void> {
|
|
await getAWorkspaceWithVNetPeeringConfigured();
|
|
}
|
|
|
|
main().catch(console.error);
|