UNPKG

@azure/arm-security

Version:
31 lines 1.5 kB
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { __awaiter } from "tslib"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { SecurityCenter } from "@azure/arm-security"; import { DefaultAzureCredential } from "@azure/identity"; /** * This sample demonstrates how to Get an alert that is associated with a subscription * * @summary Get an alert that is associated with a subscription * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-11-01/examples/Alerts/GetAlertSubscriptionLocation_example.json */ function getSecurityAlertOnASubscriptionFromASecurityDataLocation() { return __awaiter(this, void 0, void 0, function* () { const subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; const ascLocation = "westeurope"; const alertName = "2518770965529163669_F144EE95-A3E5-42DA-A279-967D115809AA"; const credential = new DefaultAzureCredential(); const client = new SecurityCenter(credential, subscriptionId); const result = yield client.alerts.getSubscriptionLevel(ascLocation, alertName); console.log(result); }); } getSecurityAlertOnASubscriptionFromASecurityDataLocation().catch(console.error); //# sourceMappingURL=alertsGetSubscriptionLevelSample.js.map