@azure/arm-security
Version:
A generated SDK for SecurityCenter.
33 lines • 1.67 kB
JavaScript
/*
* 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 Recommended tasks that will help improve the security of the subscription proactively
*
* @summary Recommended tasks that will help improve the security of the subscription proactively
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/Tasks/UpdateTaskResourceGroupLocation_example.json
*/
function changeSecurityRecommendationTaskState() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const resourceGroupName = "myRg";
const ascLocation = "westeurope";
const taskName = "d55b4dc0-779c-c66c-33e5-d7bce24c4222";
const taskUpdateActionType = "Dismiss";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential, subscriptionId);
const result = yield client.tasks.updateResourceGroupLevelTaskState(resourceGroupName, ascLocation, taskName, taskUpdateActionType);
console.log(result);
});
}
changeSecurityRecommendationTaskState().catch(console.error);
//# sourceMappingURL=tasksUpdateResourceGroupLevelTaskStateSample.js.map