Files
81b83f8618 [AutoPR @azure-arm-alertprocessingrules]-generated-from-SDK Generation - JS-6191237 (#38241)
Configurations:
'specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/AlertProcessingRules/tspconfig.yaml',
API Version: 2021-08-08, SDK Release Type: beta, and CommitSHA:
'4850dea187a72ae7ceaf0bd61b2e4a4c4b4a3b3e' in SpecRepo:
'https://github.com/Azure/azure-rest-api-specs' Pipeline run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6191237
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]>
2026-04-23 22:09:08 +08:00

29 lines
922 B
JavaScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { AlertProcessingRulesManagementClient } = require("@azure/arm-alertprocessingrules");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to get an alert processing rule by name.
*
* @summary get an alert processing rule by name.
* x-ms-original-file: 2021-08-08/AlertProcessingRules_GetById.json
*/
async function getAlertProcessingRuleById() {
const credential = new DefaultAzureCredential();
const subscriptionId = "1e3ff1c0-771a-4119-a03b-be82a51e232d";
const client = new AlertProcessingRulesManagementClient(credential, subscriptionId);
const result = await client.alertProcessingRules.getByName(
"alertscorrelationrg",
"DailySuppression",
);
console.log(result);
}
async function main() {
await getAlertProcessingRuleById();
}
main().catch(console.error);