mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to get network connections between machines
|
|
*
|
|
* @summary get network connections between machines
|
|
* x-ms-original-file: 2025-01-31-preview/Maps_GetConnectionsWithConnectedMachineForFocusedMachine.json
|
|
*/
|
|
|
|
import { DependencyMapClient } from "@azure/arm-dependencymap";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function mapsGetConnectionsWithConnectedMachineForFocusedMachineGeneratedByMaximumSetRule(): Promise<void> {
|
|
const credential = new DefaultAzureCredential();
|
|
const subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848";
|
|
const client = new DependencyMapClient(credential, subscriptionId);
|
|
await client.maps.getConnectionsWithConnectedMachineForFocusedMachine(
|
|
"rgdependencyMap",
|
|
"mapsTest1",
|
|
{
|
|
focusedMachineId: "gagovctcfgocievqwq",
|
|
connectedMachineId: "enaieiloylabljxzvmyrshp",
|
|
filters: {
|
|
dateTime: {
|
|
startDateTimeUtc: new Date("2024-03-29T07:35:15.336Z"),
|
|
endDateTimeUtc: new Date("2024-03-29T07:35:15.336Z"),
|
|
},
|
|
processNameFilter: {
|
|
operator: "contains",
|
|
processNames: ["mnqtvduwzemjcvvmnnoqvcuemwhnz"],
|
|
},
|
|
},
|
|
},
|
|
);
|
|
}
|
|
|
|
async function main(): Promise<void> {
|
|
await mapsGetConnectionsWithConnectedMachineForFocusedMachineGeneratedByMaximumSetRule();
|
|
}
|
|
|
|
main().catch(console.error);
|