@azure/arm-security
Version:
A generated SDK for SecurityCenter.
51 lines • 2.79 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 Gets the scan details of a single scan record.
*
* @summary Gets the scan details of a single scan record.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_Get.json
*/
function getScanDetailsOfAScanRecord() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const scanId = "Scheduled-20200623";
const workspaceId = "55555555-6666-7777-8888-999999999999";
const resourceId = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential, subscriptionId);
const result = yield client.sqlVulnerabilityAssessmentScans.get(scanId, workspaceId, resourceId);
console.log(result);
});
}
getScanDetailsOfAScanRecord().catch(console.error);
/**
* This sample demonstrates how to Gets the scan details of a single scan record.
*
* @summary Gets the scan details of a single scan record.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2020-07-01-preview/examples/sqlVulnerabilityAssessmentScanOperations/ArcMachineScans_GetLatest.json
*/
function getScanDetailsOfTheLatestScanRecord() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const scanId = "latest";
const workspaceId = "55555555-6666-7777-8888-999999999999";
const resourceId = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential, subscriptionId);
const result = yield client.sqlVulnerabilityAssessmentScans.get(scanId, workspaceId, resourceId);
console.log(result);
});
}
getScanDetailsOfTheLatestScanRecord().catch(console.error);
//# sourceMappingURL=sqlVulnerabilityAssessmentScansGetSample.js.map