UNPKG

@azure/arm-security

Version:
30 lines 1.69 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 Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the assessments of that type in that subscription * * @summary Delete metadata information on an assessment type in a specific subscription, will cause the deletion of all the assessments of that type in that subscription * x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2021-06-01/examples/AssessmentsMetadata/DeleteAssessmentsMetadata_subscription_example.json */ function deleteASecurityAssessmentMetadataForSubscription() { return __awaiter(this, void 0, void 0, function* () { const subscriptionId = "0980887d-03d6-408c-9566-532f3456804e"; const assessmentMetadataName = "ca039e75-a276-4175-aebc-bcd41e4b14b7"; const credential = new DefaultAzureCredential(); const client = new SecurityCenter(credential, subscriptionId); const result = yield client.assessmentsMetadata.deleteInSubscription(assessmentMetadataName); console.log(result); }); } deleteASecurityAssessmentMetadataForSubscription().catch(console.error); //# sourceMappingURL=assessmentsMetadataDeleteInSubscriptionSample.js.map