Files
azure-sdk-for-js/sdk/dependencymap/arm-dependencymap/samples-dev/mapsGetDependencyViewForFocusedMachineSample.ts

38 lines
1.3 KiB
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to get dependency map of single machine
*
* @summary get dependency map of single machine
* x-ms-original-file: 2025-01-31-preview/Maps_GetDependencyViewForFocusedMachine.json
*/
import { DependencyMapClient } from "@azure/arm-dependencymap";
import { DefaultAzureCredential } from "@azure/identity";
async function mapsGetDependencyViewForFocusedMachineGeneratedByMaximumSetRule(): Promise<void> {
const credential = new DefaultAzureCredential();
const subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848";
const client = new DependencyMapClient(credential, subscriptionId);
await client.maps.getDependencyViewForFocusedMachine("rgdependencyMap", "mapsTest1", {
focusedMachineId: "imzykeisagngrnfinbqtu",
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 mapsGetDependencyViewForFocusedMachineGeneratedByMaximumSetRule();
}
main().catch(console.error);