UNPKG

@azure/arm-security

Version:
31 lines 1.57 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 Create setting for ingesting security data and logs to correlate with resources associated with the subscription. * * @summary Create setting for ingesting security data and logs to correlate with resources associated with the subscription. * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2021-01-15-preview/examples/IngestionSettings/CreateIngestionSetting_example.json */ function createAnIngestionSettingForSubscription() { return __awaiter(this, void 0, void 0, function* () { const subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23"; const ingestionSettingName = "default"; const ingestionSetting = {}; const credential = new DefaultAzureCredential(); const client = new SecurityCenter(credential, subscriptionId); const result = yield client.ingestionSettings.create(ingestionSettingName, ingestionSetting); console.log(result); }); } createAnIngestionSettingForSubscription().catch(console.error); //# sourceMappingURL=ingestionSettingsCreateSample.js.map